update to latest stable Django 1.6.2
[mygpo.git] / bin / perform-update.sh
blob8347aa23426d8dfbed836d2d637266a6f4bc06c7
1 #!/bin/sh
2 # upgrade gpodder.net from public repository
3 # Stefan Kögl; 2011-02-10
6 BASEDIR=`dirname $0`
7 cd $BASEDIR/..
9 COUCHDB=`mygpo/print-couchdb.py`
10 MAINTENANCE_FILE=mygpo/MAINTENANCE_MODE
13 cat << EOF
15 ===================================
16 gpodder.net Upgrade
17 ===================================
19 You are about to perform an upgrade of your gpodder.net installation.
20 Press ENTER to continue or Ctrl+C to abort...
21 EOF
23 read ME
26 echo -n " * Restart Webserver in Maintenace Mode... "
27 touch $MAINTENANCE_FILE
28 sudo /etc/init.d/lighttpd restart > /dev/null
29 echo done
31 echo -n "* Stashing non-committed changes... "
32 git stash > /dev/null
33 echo done
35 echo " * Retrieving changes from public repository... "
36 git pull > /dev/null
37 echo done
39 echo " * Popping stashed changes... "
40 git stash pop > /dev/null
41 echo done
43 echo " * Syncing Database... "
44 cd mygpo
45 ./manage.py syncdb > /dev/null
46 cd ..
47 echo done
49 echo " * Wait for View-Updates to finish... "
50 bin/touch-views.sh > /dev/null
51 echo done
54 cat << EOF
56 Finished update procedure!
58 Please resolve conflicts if any
59 You can then start the webserver again by typing
61 sudo /etc/init.d/lighttpd start
63 EOF
64 rm $MAINTENANCE_FILE