aboutsummaryrefslogtreecommitdiffstats
path: root/bin/install-as-user
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2019-10-30 19:28:55 +0100
committerMarius Halden <marius.h@lden.org>2019-10-30 19:28:55 +0100
commit377bd96aab7cad3434185c30eb908c9da447fe40 (patch)
tree7ec5527e205d5b62caaa862a7de8cd25199c8bf0 /bin/install-as-user
parent56f61b1441070aa0b9ddcfc74aca46c20313609f (diff)
parent92b253904062edd533e55c22824de6fd01e2f7c1 (diff)
Merge tag 'v2.6' into fiksgatami-dev
Diffstat (limited to 'bin/install-as-user')
-rwxr-xr-xbin/install-as-user25
1 files changed, 14 insertions, 11 deletions
diff --git a/bin/install-as-user b/bin/install-as-user
index e42401758..ce6facbd1 100755
--- a/bin/install-as-user
+++ b/bin/install-as-user
@@ -25,6 +25,8 @@ misuse() {
}
[ -z "$DEVELOPMENT_INSTALL" ] && misuse DEVELOPMENT_INSTALL
+[ -z "$DOCKER" ] && misuse DOCKER
+[ -z "$INSTALL_DB" ] && misuse INSTALL_DB
DB_NAME="fixmystreet"
@@ -92,19 +94,20 @@ then
fi
echo $DONE_MSG
-# Create the database if it doesn't exist:
-echo -n "Setting up database... "
-if ! psql -l | egrep "^ *$DB_NAME *\|" > /dev/null
-then
- createdb --owner "$UNIX_USER" "$DB_NAME"
- echo 'CREATE LANGUAGE plpgsql;' | psql -U "$UNIX_USER" "$DB_NAME" || true
+if [ $INSTALL_DB = true ]; then
+ # Create the database if it doesn't exist:
+ echo -n "Setting up database... "
+ if ! psql -l | egrep "^ *$DB_NAME *\|" > /dev/null
+ then
+ createdb --owner "$UNIX_USER" "$DB_NAME"
+ echo 'CREATE LANGUAGE plpgsql;' | psql -U "$UNIX_USER" "$DB_NAME" || true
+ fi
+ bin/update-schema --commit
+ bin/update-all-reports
+ echo $DONE_MSG
fi
-bin/update-schema --commit
-echo $DONE_MSG
# Generate po and mo files (these invocations taken from Kagee's script):
echo "Creating locale .mo files"
-commonlib/bin/gettext-makemo FixMyStreet
+commonlib/bin/gettext-makemo FixMyStreet 2>&1
echo $DONE_MSG
-
-bin/update-all-reports