diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-06-12 21:33:53 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-06-14 10:13:40 +0200 |
commit | 7a82953b3e34e07df2a6ac8b09d01b47db5da879 (patch) | |
tree | 0c20a31eba8f76e638f455cd7984c55541ad245f /scripts/update.sh | |
parent | 50bcf225e906f0a499f741fc1407715e966d28f5 (diff) | |
download | wallabag-7a82953b3e34e07df2a6ac8b09d01b47db5da879.tar.gz wallabag-7a82953b3e34e07df2a6ac8b09d01b47db5da879.tar.zst wallabag-7a82953b3e34e07df2a6ac8b09d01b47db5da879.zip |
Check if .git directory exist
If that folder doesn’t exist, it means the udpate script won’t be able to run because it uses git to retrieve 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..edebe5c5 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 1; | ||
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 |