# HG changeset patch # User Jeff Hammel # Date 1269808731 14400 # Node ID ac08d765aa32a4dfc6035d62fbe57ce71621ac9f # Parent 1aacc851332ba27d0fd2ffef54f8f70d86ab5f2d allow cloning from hg instead of just svn diff -r 1aacc851332b -r ac08d765aa32 bin/venvit.sh --- a/bin/venvit.sh Sun Mar 28 16:06:50 2010 -0400 +++ b/bin/venvit.sh Sun Mar 28 16:38:51 2010 -0400 @@ -1,28 +1,35 @@ #!/bin/bash +# make a virtualenv for the product +# usage if (( $# != 1 )) then - echo "Usage: $0 " + echo "Usage: $0 " exit 0 fi +# determine name of the package NAME=$1 - for i in /trunk /branches /tag do NAME=${NAME%%$i*} done NAME=${NAME##*/} -#echo $NAME +if svn info $1 2> /dev/null +then + CHECKOUT="svn co" +else + CHECKOUT="hg clone" +fi +# create a virtualenv and install the software VIRTUAL_ENV_LOCATION="${HOME}/virtualenv/virtualenv.py" - python ${VIRTUAL_ENV_LOCATION} ${NAME} cd ${NAME} source bin/activate mkdir src/ cd src/ -svn co $1 ${NAME} +$CHECKOUT $1 ${NAME} cd ${NAME} python setup.py develop