From ae6f8df8862a19f858ec53664b2fe9302b49d17d Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 4 Nov 2011 12:29:00 +0100 Subject: [PATCH] show sqldiff --- update.sh | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/update.sh b/update.sh index 0a1f56e8..1f53899d 100755 --- a/update.sh +++ b/update.sh @@ -1,18 +1,31 @@ #!/bin/bash +pandora_repos=http://code.0x2620.org/pandora/ +oxjs_repos=http://code.0x2620.org/oxjs/ +python_ox_repos=http://code.0x2620.org/python-ox/ + cd `dirname $0` base=`pwd` current=`bzr revno` -bzr pull http://code.0x2620.org/pandora/ +bzr pull $pandora_repos new=`bzr revno` -cd static/oxjs -current=$current`bzr revno` -bzr pull http://code.0x2620.org/oxjs/ -new=$new`bzr revno` +cd $base +if [ -e static/oxjs ]; then + cd static/oxjs + current=$current`bzr revno` + bzr pull $oxjs_repos + new=$new`bzr revno` +else + cd static + bzr branch $oxjs_repos + cd oxjs + new=$new`bzr revno` +fi + cd $base if [ -e src/python-ox ]; then cd src/python-ox current=$current`bzr revno` - bzr pull http://code.0x2620.org/python-ox/ + bzr pull $python_ox_repos new=$new`bzr revno` fi cd $base @@ -20,4 +33,5 @@ if [ $current -ne $new ]; then cd pandora ./manage.py update_static ./manage.py compile_pyc + ./manage.py sqldiff -a | grep -v BEGIN | grep -v COMMIT fi