Add simple updating script
authorMagnus Hagander <magnus@hagander.net>
Sat, 13 Feb 2016 11:59:16 +0000 (12:59 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sat, 13 Feb 2016 11:59:16 +0000 (12:59 +0100)
Intended to be run manually, but to make life easier at least.

update.sh [new file with mode: 0755]

diff --git a/update.sh b/update.sh
new file mode 100755 (executable)
index 0000000..0eb138a
--- /dev/null
+++ b/update.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+set -e
+
+# Trivial update script for pgcf
+if [ "$(id -u)" == "0" ]; then
+    echo Do not run as root!
+    exit 1
+fi
+
+cd $(dirname $0)
+
+git pull --rebase
+
+./python manage.py collectstatic --noinput
+
+./python manage.py migrate
+
+echo Done!