diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-11-14 16:48:22 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-11-14 16:48:22 -0500 |
commit | 790698d078b8ee3c29ffd1a326e6bacefba4819f (patch) | |
tree | 0fd61225bab5a69968c17c2ca120cdd22e590860 /parabolaweb-update | |
parent | c4124bfc9ffb7b6a6187620ef3d0e95bc763b8dc (diff) |
update libre/parabolaweb-utils: run update_types_permissions if it exists
Diffstat (limited to 'parabolaweb-update')
-rw-r--r-- | parabolaweb-update | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/parabolaweb-update b/parabolaweb-update index 45e17c4..1789176 100644 --- a/parabolaweb-update +++ b/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 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 permission..." + ./manage.py update_types_permissions + fi + msg2 "Loading fixtures..." ./manage.py loaddata */fixtures/*.json } |