]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - scripts/dev.sh
Merge pull request #4152 from ldidry/add-env-var-dev.sh
[github/wallabag/wallabag.git] / scripts / dev.sh
old mode 100644 (file)
new mode 100755 (executable)
index 9b89da3..cc465cf
@@ -1,7 +1,20 @@
-#! /usr/bin/env bash
-# You can execute this file to install wallabag dev environmnet
-# eg: `sh install.sh prod`
+#!/usr/bin/env bash
+# You can execute this file to install wallabag dev environment
+# eg: `sh dev.sh`
 
-composer install
-php bin/console wallabag:install
-php bin/console server:run
+COMPOSER_COMMAND='composer'
+REQUIRE_FILE='scripts/require.sh'
+
+if [ ! -f "$REQUIRE_FILE" ]; then
+  echo "Cannot find $REQUIRE_FILE"
+  exit 1
+fi
+
+. "$REQUIRE_FILE"
+
+$COMPOSER_COMMAND install
+if [ -z "$SKIP_WALLABAG_INITIALIZATION" ]
+then
+    php bin/console wallabag:install
+fi
+php bin/console server:run $HOST