From bcfdeb7aea4cb263a47502abd04f47ab59210b1c Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 14 Jan 2014 14:14:45 -0800 Subject: bootstrap script -- make run passthrough args work, allow init to be re-run. --- pkg/scripts/bootstrap_develop.sh | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'pkg') diff --git a/pkg/scripts/bootstrap_develop.sh b/pkg/scripts/bootstrap_develop.sh index 225bc303..7027a908 100755 --- a/pkg/scripts/bootstrap_develop.sh +++ b/pkg/scripts/bootstrap_develop.sh @@ -17,6 +17,7 @@ # along with this program. If not, see . ###################################################################### set -e # Exit immediately if a command exits with a non-zero status. + REPOSITORIES="bitmask_client leap_pycommon soledad keymanager leap_mail" PACKAGES="leap_pycommon keymanager soledad/common soledad/client soledad/server leap_mail bitmask_client" REPOS_ROOT=`pwd` # Root path for all the needed repositories @@ -40,20 +41,16 @@ clone_repos() { if [[ "$1" == "ro" ]]; then # read-only remotes: - git clone https://leap.se/git/bitmask_client - git clone https://leap.se/git/leap_pycommon - git clone https://leap.se/git/soledad - git clone https://leap.se/git/keymanager - git clone https://leap.se/git/leap_mail + src="https://leap.se/git" else # read-write remotes: - git clone ssh://gitolite@leap.se/bitmask_client - git clone ssh://gitolite@leap.se/leap_pycommon - git clone ssh://gitolite@leap.se/soledad - git clone ssh://gitolite@leap.se/keymanager - git clone ssh://gitolite@leap.se/leap_mail + src="ssh://gitolite@leap.se" fi + for repo in $REPOSITORIES; do + [ ! -d $repo ] && git clone $src/$repo + done + set +x echo "${cc_green}Status: $status done!${cc_normal}" } @@ -163,10 +160,12 @@ update() { } run() { + shift # remove 'run' from arg list + passthrough_args=$@ echo "${cc_green}Status: running client...${cc_normal}" source bitmask.venv/bin/activate set -x - python bitmask_client/src/leap/bitmask/app.py -d $* + python bitmask_client/src/leap/bitmask/app.py -d $passthrough_args set +x } @@ -175,7 +174,7 @@ help() { echo "Bootstraps the environment to start developing the bitmask client" echo "with all the needed repositories and dependencies." echo - echo "Usage: $0 {init | update | help}" + echo "Usage: $0 {init | update | run | help}" echo echo " init : Initialize repositories, create virtualenv and \`python setup.py develop\` all." echo " You can use \`init ro\` in order to use the https remotes if you don't have rw access." @@ -193,7 +192,7 @@ case "$1" in update ;; run) - run + run "$@" ;; *) help -- cgit v1.2.3