summaryrefslogtreecommitdiff
path: root/install-pixelated.sh
diff options
context:
space:
mode:
authorFolker Bernitt <fbernitt@thoughtworks.com>2015-01-22 17:42:17 +0100
committerFolker Bernitt <fbernitt@thoughtworks.com>2015-01-22 17:42:17 +0100
commit895d1ae9e5d0260b3d55b352deab7be589d24a99 (patch)
treebf9b81b5811865482a0a9851374adc5271260dc0 /install-pixelated.sh
parent781c9b33bb23d94398078d520f06a6def823a754 (diff)
Issue #244: Preparations for hackday vagrant image.
- To use it, do these steps: build the box: vagrant destroy && vagrant up source vagrant package --output hackday-user-agent.box source use the box: vagrant box add hackday-user-agent hackday-user-agent.box vagrant up hackday vagrant ssh hackday Scripts will be provided with next commit.
Diffstat (limited to 'install-pixelated.sh')
-rwxr-xr-xinstall-pixelated.sh22
1 files changed, 19 insertions, 3 deletions
diff --git a/install-pixelated.sh b/install-pixelated.sh
index fa6cd1e4..3e430783 100755
--- a/install-pixelated.sh
+++ b/install-pixelated.sh
@@ -24,6 +24,22 @@ then
export USERNAME=`whoami`
fi
+usage() { echo "Usage: $0 [-v <virtualenv path>]" 1>&2; exit 1; }
+
+VIRTUALENV_PATH=".virtualenv"
+
+while getopts "v:" OPT; do
+ case "${OPT}" in
+ v)
+ VIRTUALENV_PATH=${OPTARG}
+ ;;
+ *)
+ usage
+ ;;
+ esac
+done
+shift $((OPTIND-1))
+
function check_installed() {
which $1
if [ $? -ne 0 ]; then
@@ -46,9 +62,9 @@ LC_ALL=en_US.UTF-8 ./go build
# install service dependencies
cd ../service
-rm -rf .virtualenv
-virtualenv .virtualenv
-source .virtualenv/bin/activate
+rm -rf "$VIRTUALENV_PATH"
+virtualenv "$VIRTUALENV_PATH"
+source "$VIRTUALENV_PATH/bin/activate"
./go setup --always-unzip
pip uninstall -y enum34
pip install enum34