From b0575d04cb0bd23a5d0185daccfe5916ce919cac Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 14 Nov 2012 16:48:22 -0500 Subject: update libre/parabolaweb-utils: run update_types_permissions if it exists --- libre/parabolaweb-utils/parabolaweb-update | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'libre/parabolaweb-utils/parabolaweb-update') diff --git a/libre/parabolaweb-utils/parabolaweb-update b/libre/parabolaweb-utils/parabolaweb-update index 45e17c4f2..178917673 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 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 } -- cgit v1.2.3 From b1c72d09dd64bffc2fa820bf0927623efc8a394f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 15 Nov 2012 01:42:27 -0500 Subject: improve libre/parabolaweb-utils --- libre/parabolaweb-utils/PKGBUILD | 4 ++-- libre/parabolaweb-utils/parabolaweb-update | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'libre/parabolaweb-utils/parabolaweb-update') diff --git a/libre/parabolaweb-utils/PKGBUILD b/libre/parabolaweb-utils/PKGBUILD index bfdfc54da..5fdd12bdb 100644 --- a/libre/parabolaweb-utils/PKGBUILD +++ b/libre/parabolaweb-utils/PKGBUILD @@ -8,7 +8,7 @@ pkgname=parabolaweb-utils pkgver=`_get_pkgver` -pkgrel=7 +pkgrel=8 pkgdesc="Utils for the Parabola website" arch=('any') url="https://projects.parabolagnulinux.org/parabolaweb.git/" @@ -50,7 +50,7 @@ package() { md5sums=('SKIP' 'f162c2ce49b4cafe0a14bd4767dfea04' - '184f3e52781747369d8e26abc9723f7c' + '7c212024c134fdd0d0318b52a5448ddb' 'd5294495f42df29d29519ebd0a8f6093' 'cc15e153f99fba82e7bb032896f655c2' 'a468016a7155b5da46521dcfc6428384' diff --git a/libre/parabolaweb-utils/parabolaweb-update b/libre/parabolaweb-utils/parabolaweb-update index 178917673..2da9eea8a 100644 --- a/libre/parabolaweb-utils/parabolaweb-update +++ b/libre/parabolaweb-utils/parabolaweb-update @@ -18,7 +18,7 @@ clean() { cd "$WEBDIR" msg "Purging old .pyc files..." find . -name '*.pyc' -delete - msg "Purging GNU Make generated files..." + msg "Purging old GNU Make generated files..." for dir in `find_makefiles`; do make -C "$WEBDIR/$dir" clean done @@ -50,7 +50,7 @@ update-database() { msg2 "Running migrations..." ./manage.py migrate if [[ -f devel/management/commands/update_types_permissions.py ]]; then - msg2 "Updating permission..." + msg2 "Updating permissions..." ./manage.py update_types_permissions fi msg2 "Loading fixtures..." @@ -74,10 +74,11 @@ main() { exit 1 fi + if [[ -d "$WEBDIR" ]]; then + clean + fi parabolaweb-download - clean configure - clean update-database update-filesystem } -- cgit v1.2.3