From 9998c725330b4a99d6d12df60ac8234052e80b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 27 Oct 2016 09:53:09 +0200 Subject: Added require.sh to check if composer is installed --- scripts/require.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 scripts/require.sh (limited to 'scripts/require.sh') diff --git a/scripts/require.sh b/scripts/require.sh new file mode 100644 index 00000000..851d065d --- /dev/null +++ b/scripts/require.sh @@ -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; } -- cgit v1.2.3 From c4d9a8d6d0db2be5c502e257bbeb963e3870d521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 27 Oct 2016 10:09:43 +0200 Subject: Usage of composer.phar if it's found --- scripts/require.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts/require.sh') diff --git a/scripts/require.sh b/scripts/require.sh index 851d065d..ddfb3dd2 100644 --- a/scripts/require.sh +++ b/scripts/require.sh @@ -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; } -- cgit v1.2.3