Created
October 20, 2014 09:53
-
-
Save hagsteel/7a0502c4dd830044f202 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[ -z "$VIRTUAL_ENV" ] && { echo "No virtual environment active"; exit 1; } | |
#let vepath="$VIRTUAL_ENV" | |
project_file="/.project" | |
fpath=$VIRTUAL_ENV$project_file | |
if [ -f "$fpath" ] | |
then | |
echo "This virtualenv already have a .project file" | |
exit 1 | |
fi | |
echo "Writing virtualenv project path" | |
touch $VIRTUAL_ENV/.project | |
echo `pwd` > $VIRTUAL_ENV/.project |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage:
Note: you can obviously use
setvirtualenvproject
however this will automatically set thecwd
to your project dir