]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Added require.sh to check if composer is installed
authorNicolas Lœuillet <nicolas@loeuillet.org>
Thu, 27 Oct 2016 07:53:09 +0000 (09:53 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Thu, 27 Oct 2016 07:53:09 +0000 (09:53 +0200)
scripts/dev.sh
scripts/install.sh
scripts/require.sh [new file with mode: 0644]
scripts/update.sh

index 9b89da35faf2aa18ee70408312659f072ecacc7a..9f5b2432bebb04eafef732d14ee0f54226384891 100644 (file)
@@ -1,6 +1,10 @@
 #! /usr/bin/env bash
-# You can execute this file to install wallabag dev environmnet
-# eg: `sh install.sh prod`
+# You can execute this file to install wallabag dev environment
+# eg: `sh dev.sh`
+
+DIR="${BASH_SOURCE%/*}"
+if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
+. "$DIR/require.sh"
 
 composer install
 php bin/console wallabag:install
index d7b05a1ec2eb17c6fdec148158dd37abed7dbbc0..cf966a0dd3705d57b6c9946fa399fca7a02125b9 100644 (file)
@@ -2,7 +2,9 @@
 # You can execute this file to install wallabag
 # eg: `sh install.sh prod`
 
-command -v composer >/dev/null 2>&1 || { echo >&2 "wallabag requires composer but it's not installed (see http://doc.wallabag.org/en/master/user/installation.html). Aborting."; exit 1; }
+DIR="${BASH_SOURCE%/*}"
+if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
+. "$DIR/require.sh"
 
 ENV=$1
 TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
diff --git a/scripts/require.sh b/scripts/require.sh
new file mode 100644 (file)
index 0000000..851d065
--- /dev/null
@@ -0,0 +1,8 @@
+#! /usr/bin/env bash
+# File used to check dependencies
+
+if [ ! -f composer.phar ]; then
+    echo "composer.phar not found, we'll see if composer is installed globally."
+fi
+
+command -v composer >/dev/null 2>&1 || { echo >&2 "wallabag requires composer but it's not installed (see http://doc.wallabag.org/en/master/user/installation.html). Aborting."; exit 1; }
index b920a829b0ae06558f22d6865a7b226390fcab14..96a48217f492caea1835323c116162e3bce9fd45 100644 (file)
@@ -2,6 +2,10 @@
 # You can execute this file to update wallabag
 # eg: `sh update.sh prod`
 
+DIR="${BASH_SOURCE%/*}"
+if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
+. "$DIR/require.sh"
+
 ENV=$1
 TAG=$(git describe --tags $(git rev-list --tags --max-count=1))