aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/install.sh
diff options
context:
space:
mode:
authorlizyn <zhiylin@outlook.com>2020-02-24 10:04:13 +0800
committerGitHub <noreply@github.com>2020-02-24 10:04:13 +0800
commitb19df31d78d881a43bcf6b3215e5fc3781e8e8aa (patch)
treed0d9861694a4b5e5fbfdbeb53c255ecd15fe9328 /scripts/install.sh
parent4d0c632c70ea50d459c3c55ddda2e0f394dd51cb (diff)
parent04d918cae0227c06a41d27fb6533dddbf30dfe71 (diff)
downloadwallabag-b19df31d78d881a43bcf6b3215e5fc3781e8e8aa.tar.gz
wallabag-b19df31d78d881a43bcf6b3215e5fc3781e8e8aa.tar.zst
wallabag-b19df31d78d881a43bcf6b3215e5fc3781e8e8aa.zip
Merge pull request #1 from wallabag/master
Keep up with the master again
Diffstat (limited to 'scripts/install.sh')
-rwxr-xr-xscripts/install.sh25
1 files changed, 18 insertions, 7 deletions
diff --git a/scripts/install.sh b/scripts/install.sh
index 8b7ea03f..affa715f 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -5,9 +5,17 @@
5IGNORE_ROOT_ARG="--ignore-root-warning" 5IGNORE_ROOT_ARG="--ignore-root-warning"
6IGNORE_ROOT=0 6IGNORE_ROOT=0
7 7
8if [ "$1" == "$IGNORE_ROOT_ARG" ]; then 8while :; do
9 IGNORE_ROOT=1 9 case $1 in
10fi 10 $IGNORE_ROOT_ARG) IGNORE_ROOT=1
11 ;;
12 *[a-zA-Z]) ENV=$1
13 ;;
14 *) break
15 ;;
16 esac
17 shift
18done
11 19
12# Abort running this script if root 20# Abort running this script if root
13if [ "$IGNORE_ROOT" -eq 0 ] && [ "$EUID" == "0" ]; then 21if [ "$IGNORE_ROOT" -eq 0 ] && [ "$EUID" == "0" ]; then
@@ -17,12 +25,15 @@ if [ "$IGNORE_ROOT" -eq 0 ] && [ "$EUID" == "0" ]; then
17fi 25fi
18 26
19COMPOSER_COMMAND='composer' 27COMPOSER_COMMAND='composer'
28REQUIRE_FILE='scripts/require.sh'
29
30if [ ! -f "$REQUIRE_FILE" ]; then
31 echo "Cannot find $REQUIRE_FILE"
32 exit 1
33fi
20 34
21DIR="${BASH_SOURCE}" 35. "$REQUIRE_FILE"
22if [ ! -d "$DIR" ]; then DIR="$PWD/scripts"; fi
23. "$DIR/require.sh"
24 36
25ENV=$1
26TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) 37TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
27 38
28git checkout $TAG 39git checkout $TAG