From 895d1ae9e5d0260b3d55b352deab7be589d24a99 Mon Sep 17 00:00:00 2001 From: Folker Bernitt Date: Thu, 22 Jan 2015 17:42:17 +0100 Subject: 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. --- install-pixelated.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'install-pixelated.sh') 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 ]" 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 -- cgit v1.2.3