aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2019-04-01 13:16:15 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2019-04-01 13:16:15 +0200
commit3620dae1e6b3fab5a4ba4001b4581ce7ed795996 (patch)
tree775d2fe5b2942d9231888ed01d0a0081a1b2347e /scripts
parentb886ee923d7e627da2ae0221271bedbcb495025a (diff)
parentbfd69c74e5b4f2ebfcb304b1983bf771c2bb11f7 (diff)
downloadwallabag-3620dae1e6b3fab5a4ba4001b4581ce7ed795996.tar.gz
wallabag-3620dae1e6b3fab5a4ba4001b4581ce7ed795996.tar.zst
wallabag-3620dae1e6b3fab5a4ba4001b4581ce7ed795996.zip
Merge remote-tracking branch 'origin/master' into 2.4
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dev.sh10
-rwxr-xr-xscripts/install.sh25
-rwxr-xr-xscripts/update.sh24
3 files changed, 42 insertions, 17 deletions
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 @@
3# eg: `sh dev.sh` 3# eg: `sh dev.sh`
4 4
5COMPOSER_COMMAND='composer' 5COMPOSER_COMMAND='composer'
6REQUIRE_FILE='scripts/require.sh'
6 7
7DIR="${BASH_SOURCE}" 8if [ ! -f "$REQUIRE_FILE" ]; then
8if [ ! -d "$DIR" ]; then DIR="$PWD/scripts"; fi 9 echo "Cannot find $REQUIRE_FILE"
9. "$DIR/require.sh" 10 exit 1
11fi
12
13. "$REQUIRE_FILE"
10 14
11$COMPOSER_COMMAND install 15$COMPOSER_COMMAND install
12php bin/console wallabag:install 16php bin/console wallabag:install
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
diff --git a/scripts/update.sh b/scripts/update.sh
index c62d104a..3ef10439 100755
--- a/scripts/update.sh
+++ b/scripts/update.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
@@ -20,12 +28,14 @@ set -e
20set -u 28set -u
21 29
22COMPOSER_COMMAND='composer' 30COMPOSER_COMMAND='composer'
31REQUIRE_FILE='scripts/require.sh'
23 32
24DIR="${BASH_SOURCE}" 33if [ ! -f "$REQUIRE_FILE" ]; then
25if [ ! -d "$DIR" ]; then DIR="$PWD/scripts"; fi 34 echo "Cannot find $REQUIRE_FILE"
26. "$DIR/require.sh" 35 exit 1
36fi
27 37
28ENV=$1 38. "$REQUIRE_FILE"
29 39
30rm -rf var/cache/* 40rm -rf var/cache/*
31git fetch origin 41git fetch origin