Mercurial > hg > config
view bin/venvit.sh @ 116:2a83052a7a50
add hg defaults from http://blog.bonardo.net/2010/06/22/so-youre-about-to-use-checkin-needed
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 09 Dec 2010 14:49:14 -0800 |
parents | 6463a7e37c45 |
children |
line wrap: on
line source
#!/bin/bash # make a virtualenv for the product # usage if (( $# != 1 )) then echo "Usage: $0 <svn-or-hg-location>" exit 0 fi # determine name of the package NAME=$1 for i in /trunk /branches /tag do NAME=${NAME%%$i*} done NAME=${NAME%%/} # remove trailing slash NAME=${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/ $CHECKOUT $1 ${NAME} cd ${NAME} python setup.py develop