]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - scripts/dev.sh
Check if .git directory exist
[github/wallabag/wallabag.git] / scripts / dev.sh
old mode 100644 (file)
new mode 100755 (executable)
index fa3b2d5..28453be
@@ -1,12 +1,16 @@
-#! /usr/bin/env bash
+#!/usr/bin/env bash
 # You can execute this file to install wallabag dev environment
 # eg: `sh dev.sh`
 
 COMPOSER_COMMAND='composer'
+REQUIRE_FILE='scripts/require.sh'
 
-DIR="${BASH_SOURCE%/*}"
-if [[ ! -d "$DIR" ]]; then DIR="$PWD"; 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