smarter update.sh

This commit is contained in:
j 2011-11-02 21:51:29 +01:00
parent 2101548d74
commit f3779c9dbe

View file

@ -1,8 +1,23 @@
#!/bin/bash
cd `dirname $0`
base=`pwd`
current=`bzr revno`
bzr pull http://code.0x2620.org/pandora/
new=`bzr revno`
cd static/oxjs
current=$current`bzr revno`
bzr pull http://code.0x2620.org/oxjs/
test -e src/python-ox && cd src/python-ox && bzr pull http://code.0x2620.org/python-ox/
new=$new`bzr revno`
cd $base
cd pandora && ./manage.py update_static && ./manage.py compile_pyc
if [ -e src/python-ox ]; then
cd src/python-ox
current=$current`bzr revno`
bzr pull http://code.0x2620.org/python-ox/
new=$new`bzr revno`
fi
cd $base
if [ $current -ne $new ]; then
cd pandora
./manage.py update_static
./manage.py compile_pyc
fi