debian: ugit is now debianized
[ugit.git] / scripts / common.sh
blob635f229847effbd77962edab75c8bcb5c2e63f93
1 #!/bin/sh
3 waf_backup()
5 if [ -e .lock-wscript ]; then
6 mv .lock-wscript .lock-wscript.old
7 fi
10 waf_restore()
12 if [ -e .lock-wscript.old ]; then
13 mv .lock-wscript.old .lock-wscript
17 try_python()
19 waf_backup
20 env PYTHON="$1" \
21 ./configure \
22 --prefix="$2" \
23 --blddir="$PWD/tmp.$$" &&
24 make &&
25 make install
26 status=$?
28 rm -rf "$PWD/tmp.$$"
30 if test -z $status; then
31 echo "exited with status code $status"
32 exit $status
36 waf_restore
39 cd $(dirname $0)
40 cd ..
42 VERSION=$(scripts/version.sh)