Skip to content

Commit

Permalink
Fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleykleynhans committed Jan 19, 2024
1 parent c5927c2 commit 20e0c0f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/fix_venv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

if [ "$#" -ne 2 ]; then
echo "Usage: $0 <OLD_VENV> <NEW_VENV>"
echo " eg: $0 /home/ubuntu/test/venv /home/ubuntu/test/venv2"
echo " eg: $0 /venv /workspace/venv"
exit 1
fi

OLD_PATH=${1}
NEW_PATH=${2}

echo "Fixing venv. Old Path: ${OLD_PATH} New Path: ${NEW_PATH}"

cd ${NEW_PATH}/bin
sed -i "s|VIRTUAL_ENV=\"${OLD_PATH}\"|VIRTUAL_ENV=\"${NEW_PATH}\"|" activate
sed -i 's|#!/venv/bin/python3|#!/workspace/venv/bin/python3|' *
sed -i "s|#\!${OLD_PATH}/bin/python3|#\!${NEW_PATH}/bin/python3|" *

0 comments on commit 20e0c0f

Please sign in to comment.