From: Matthias Baur Date: Thu, 17 Jan 2019 19:04:57 +0000 (+0100) Subject: Properly source require.sh X-Git-Tag: 2.3.8~9^2 X-Git-Url: https://git.immae.eu/?p=github%2Fwallabag%2Fwallabag.git;a=commitdiff_plain;h=7c553a6017c64d98017a6010dc6e77d22ab72da4 Properly source require.sh Fixes #3571. --- diff --git a/scripts/dev.sh b/scripts/dev.sh index 0703ced1..28453be0 100755 --- a/scripts/dev.sh +++ b/scripts/dev.sh @@ -3,10 +3,14 @@ # 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 diff --git a/scripts/install.sh b/scripts/install.sh index de1fb8f6..affa715f 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -25,10 +25,14 @@ if [ "$IGNORE_ROOT" -eq 0 ] && [ "$EUID" == "0" ]; then fi 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" TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) diff --git a/scripts/update.sh b/scripts/update.sh index e86a76db..3ef10439 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -28,10 +28,14 @@ set -e set -u 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" rm -rf var/cache/* git fetch origin