]> 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
index 0703ced1ef9111ef4c08d055db471fb43f50fad3..cc465cf9877aac24a10997ff52af1c0339df0766 100755 (executable)
@@ -3,11 +3,18 @@
 # eg: `sh dev.sh`
 
 COMPOSER_COMMAND='composer'
+REQUIRE_FILE='scripts/require.sh'
 
-DIR="${BASH_SOURCE}"
-if [ ! -d "$DIR" ]; then DIR="$PWD/scripts"; fi
-. "$DIR/require.sh"
+if [ ! -f "$REQUIRE_FILE" ]; then
+  echo "Cannot find $REQUIRE_FILE"
+  exit 1
+fi
+
+. "$REQUIRE_FILE"
 
 $COMPOSER_COMMAND install
-php bin/console wallabag:install
-php bin/console server:run
+if [ -z "$SKIP_WALLABAG_INITIALIZATION" ]
+then
+    php bin/console wallabag:install
+fi
+php bin/console server:run $HOST