diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-10-27 09:53:09 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-10-27 09:53:09 +0200 |
commit | 9998c725330b4a99d6d12df60ac8234052e80b6a (patch) | |
tree | 7e1c3691482fd262d02884f0c6ceadeb260757bc /scripts | |
parent | f3b637fbfee2fa9f66e53cbadd05e85771eece9d (diff) | |
download | wallabag-9998c725330b4a99d6d12df60ac8234052e80b6a.tar.gz wallabag-9998c725330b4a99d6d12df60ac8234052e80b6a.tar.zst wallabag-9998c725330b4a99d6d12df60ac8234052e80b6a.zip |
Added require.sh to check if composer is installed
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/dev.sh | 8 | ||||
-rw-r--r-- | scripts/install.sh | 4 | ||||
-rw-r--r-- | scripts/require.sh | 8 | ||||
-rw-r--r-- | scripts/update.sh | 4 |
4 files changed, 21 insertions, 3 deletions
diff --git a/scripts/dev.sh b/scripts/dev.sh index 9b89da35..9f5b2432 100644 --- a/scripts/dev.sh +++ b/scripts/dev.sh | |||
@@ -1,6 +1,10 @@ | |||
1 | #! /usr/bin/env bash | 1 | #! /usr/bin/env bash |
2 | # You can execute this file to install wallabag dev environmnet | 2 | # You can execute this file to install wallabag dev environment |
3 | # eg: `sh install.sh prod` | 3 | # eg: `sh dev.sh` |
4 | |||
5 | DIR="${BASH_SOURCE%/*}" | ||
6 | if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi | ||
7 | . "$DIR/require.sh" | ||
4 | 8 | ||
5 | composer install | 9 | composer install |
6 | php bin/console wallabag:install | 10 | php bin/console wallabag:install |
diff --git a/scripts/install.sh b/scripts/install.sh index d7b05a1e..cf966a0d 100644 --- a/scripts/install.sh +++ b/scripts/install.sh | |||
@@ -2,7 +2,9 @@ | |||
2 | # You can execute this file to install wallabag | 2 | # You can execute this file to install wallabag |
3 | # eg: `sh install.sh prod` | 3 | # eg: `sh install.sh prod` |
4 | 4 | ||
5 | 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; } | 5 | DIR="${BASH_SOURCE%/*}" |
6 | if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi | ||
7 | . "$DIR/require.sh" | ||
6 | 8 | ||
7 | ENV=$1 | 9 | ENV=$1 |
8 | TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) | 10 | TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) |
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 @@ | |||
1 | #! /usr/bin/env bash | ||
2 | # File used to check dependencies | ||
3 | |||
4 | if [ ! -f composer.phar ]; then | ||
5 | echo "composer.phar not found, we'll see if composer is installed globally." | ||
6 | fi | ||
7 | |||
8 | 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; } | ||
diff --git a/scripts/update.sh b/scripts/update.sh index b920a829..96a48217 100644 --- a/scripts/update.sh +++ b/scripts/update.sh | |||
@@ -2,6 +2,10 @@ | |||
2 | # You can execute this file to update wallabag | 2 | # You can execute this file to update wallabag |
3 | # eg: `sh update.sh prod` | 3 | # eg: `sh update.sh prod` |
4 | 4 | ||
5 | DIR="${BASH_SOURCE%/*}" | ||
6 | if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi | ||
7 | . "$DIR/require.sh" | ||
8 | |||
5 | ENV=$1 | 9 | ENV=$1 |
6 | TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) | 10 | TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) |
7 | 11 | ||