aboutsummaryrefslogtreecommitdiffstats
path: root/bin/install-as-user
diff options
context:
space:
mode:
Diffstat (limited to 'bin/install-as-user')
-rwxr-xr-xbin/install-as-user23
1 files changed, 13 insertions, 10 deletions
diff --git a/bin/install-as-user b/bin/install-as-user
index e42401758..7e2a0bd74 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
echo $DONE_MSG
-
-bin/update-all-reports