]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Usage of composer.phar if it's found 2507/head
authorNicolas Lœuillet <nicolas@loeuillet.org>
Thu, 27 Oct 2016 08:09:43 +0000 (10:09 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Thu, 27 Oct 2016 08:09:43 +0000 (10:09 +0200)
scripts/dev.sh
scripts/install.sh
scripts/require.sh
scripts/update.sh

index 9f5b2432bebb04eafef732d14ee0f54226384891..fa3b2d5d5de32509e2e4160fd7a8b64ad9407c7f 100644 (file)
@@ -2,10 +2,12 @@
 # You can execute this file to install wallabag dev environment
 # eg: `sh dev.sh`
 
+COMPOSER_COMMAND='composer'
+
 DIR="${BASH_SOURCE%/*}"
 if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
 . "$DIR/require.sh"
 
-composer install
+$COMPOSER_COMMAND install
 php bin/console wallabag:install
 php bin/console server:run
index cf966a0dd3705d57b6c9946fa399fca7a02125b9..7a1f02bd80888c65fe7c97a2c33cc3e7346bd110 100644 (file)
@@ -2,6 +2,8 @@
 # You can execute this file to install wallabag
 # eg: `sh install.sh prod`
 
+COMPOSER_COMMAND='composer'
+
 DIR="${BASH_SOURCE%/*}"
 if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
 . "$DIR/require.sh"
@@ -10,5 +12,5 @@ ENV=$1
 TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
 
 git checkout $TAG
-SYMFONY_ENV=$ENV composer install --no-dev -o --prefer-dist
+SYMFONY_ENV=$ENV $COMPOSER_COMMAND install --no-dev -o --prefer-dist
 php bin/console wallabag:install --env=$ENV
index 851d065ddc69d15b7376f34c6ffbfd2d583d6b16..ddfb3dd2a9659d4a8dca7d76dfbec26c71715c76 100644 (file)
@@ -3,6 +3,7 @@
 
 if [ ! -f composer.phar ]; then
     echo "composer.phar not found, we'll see if composer is installed globally."
+    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; }
+else
+    COMPOSER_COMMAND='composer.phar'
 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 96a48217f492caea1835323c116162e3bce9fd45..45e93f3634eb09609852e5fd205a036ad4359ba2 100644 (file)
@@ -2,6 +2,8 @@
 # You can execute this file to update wallabag
 # eg: `sh update.sh prod`
 
+COMPOSER_COMMAND='composer'
+
 DIR="${BASH_SOURCE%/*}"
 if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
 . "$DIR/require.sh"
@@ -13,5 +15,5 @@ rm -rf var/cache/*
 git fetch origin
 git fetch --tags
 git checkout $TAG --force
-SYMFONY_ENV=$ENV composer install --no-dev -o --prefer-dist
+SYMFONY_ENV=$ENV $COMPOSER_COMMAND install --no-dev -o --prefer-dist
 php bin/console cache:clear --env=$ENV