diff options
author | André Fabian Silva Delgado <emulatorman@lavabit.com> | 2012-11-15 22:03:34 -0200 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@lavabit.com> | 2012-11-15 22:03:34 -0200 |
commit | af0617e9478512e64b1681d6e1da3baeb3f72216 (patch) | |
tree | 9861fb74dc5de2eac3edf9207e0a22791fa05c85 /libre/parabolaweb-utils/parabolaweb-update | |
parent | af1438a26ac6cbdb10b9e780c1bc69c459963b78 (diff) | |
parent | 9e33443ecf9575280008587e78750259e0519335 (diff) | |
download | abslibre-af0617e9478512e64b1681d6e1da3baeb3f72216.tar.gz abslibre-af0617e9478512e64b1681d6e1da3baeb3f72216.tar.bz2 abslibre-af0617e9478512e64b1681d6e1da3baeb3f72216.zip |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'libre/parabolaweb-utils/parabolaweb-update')
-rw-r--r-- | libre/parabolaweb-utils/parabolaweb-update | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/libre/parabolaweb-utils/parabolaweb-update b/libre/parabolaweb-utils/parabolaweb-update index 45e17c4f2..2da9eea8a 100644 --- a/libre/parabolaweb-utils/parabolaweb-update +++ b/libre/parabolaweb-utils/parabolaweb-update @@ -15,17 +15,18 @@ find_makefiles() { } clean() { - msg "Purging old .pyc files...." cd "$WEBDIR" + msg "Purging old .pyc files..." find . -name '*.pyc' -delete + msg "Purging old GNU Make generated files..." for dir in `find_makefiles`; do make -C "$WEBDIR/$dir" clean done } configure() { - msg "Checking configuration...." cd "$WEBDIR" + msg "Checking configuration..." if [[ ! -f local_settings.py ]]; then msg2 "Configuration file missing, opening editor..." cp local_settings.py.example local_settings.tmp.$$.py @@ -36,7 +37,7 @@ configure() { msg "Failed to configure, exiting" exit 1 fi - msg2 "Creating database...." + msg2 "Creating database..." ./manage.py syncdb else msg2 "Current configuration checks out" @@ -44,11 +45,15 @@ configure() { } update-database() { - msg "Updating database...." cd "$WEBDIR" - msg2 "Running migrations...." + msg "Updating database..." + msg2 "Running migrations..." ./manage.py migrate - msg2 "Loading fixtures...." + if [[ -f devel/management/commands/update_types_permissions.py ]]; then + msg2 "Updating permissions..." + ./manage.py update_types_permissions + fi + msg2 "Loading fixtures..." ./manage.py loaddata */fixtures/*.json } @@ -69,10 +74,11 @@ main() { exit 1 fi + if [[ -d "$WEBDIR" ]]; then + clean + fi parabolaweb-download - clean configure - clean update-database update-filesystem } |