diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2019-06-17 08:19:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-17 08:19:16 +0200 |
commit | f981d1d732350f31baa731ef9edee7bfa08def82 (patch) | |
tree | 48738b39278509fdba81d78ebf209c827ebf7105 /scripts/update.sh | |
parent | 1bbdd35731a25bf75ad48f0a531df3f346967f5b (diff) | |
parent | 0a258f85be31c5d99317ffdc83cc8735e504ed48 (diff) | |
download | wallabag-f981d1d732350f31baa731ef9edee7bfa08def82.tar.gz wallabag-f981d1d732350f31baa731ef9edee7bfa08def82.tar.zst wallabag-f981d1d732350f31baa731ef9edee7bfa08def82.zip |
Merge pull request #4009 from wallabag/fix/check-git-directory
Check if .git directory exist before making the update
Diffstat (limited to 'scripts/update.sh')
-rwxr-xr-x | scripts/update.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/update.sh b/scripts/update.sh index 3ef10439..1f31d429 100755 --- a/scripts/update.sh +++ b/scripts/update.sh | |||
@@ -37,6 +37,12 @@ fi | |||
37 | 37 | ||
38 | . "$REQUIRE_FILE" | 38 | . "$REQUIRE_FILE" |
39 | 39 | ||
40 | # Check for wallabag .git folder | ||
41 | if [ ! -d .git ]; then | ||
42 | echo "Can not update because wallabag wasn't installed using git (see https://doc.wallabag.org/en/admin/upgrade.html#upgrade-on-a-shared-hosting). Aborting."; | ||
43 | exit 2; | ||
44 | fi | ||
45 | |||
40 | rm -rf var/cache/* | 46 | rm -rf var/cache/* |
41 | git fetch origin | 47 | git fetch origin |
42 | git fetch --tags | 48 | git fetch --tags |