summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-08-18 18:49:24 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-08-18 18:49:24 +0200
commitdfecb6307872d1e7cb77e9fd18fffb921b3e33bf (patch)
tree57744be7d0bcb324c164a9c21bab3c50a0af283c
parent00015bd10507181797dd74cbba375f9e88c61e51 (diff)
downloadvim-polyglot-dfecb6307872d1e7cb77e9fd18fffb921b3e33bf.tar.gz
vim-polyglot-dfecb6307872d1e7cb77e9fd18fffb921b3e33bf.zip
Report download errors
-rwxr-xr-xbuild6
1 files changed, 3 insertions, 3 deletions
diff --git a/build b/build
index 972d376d..d8f38262 100755
--- a/build
+++ b/build
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-set -E
+set -eo pipefail
DIRS="syntax indent compiler autoload ftplugin ctags after/syntax after/indent after/ftplugin"
# shellcheck disable=SC2034
@@ -28,7 +28,7 @@ download() {
repo="$(awk -F\# '{print $1}' <<<"$path")"
branch="$(awk -F\# '{print $2}' <<<"$path")"
rm -rf "$dir"
- (mkdir -p "$dir" && curl --silent -L "https://codeload.github.com/$repo/tar.gz/${branch:-master}" | tar -zx -C "$dir" --strip 1 && printf '.') &
+ (mkdir -p "$dir" && curl --silent -fL "https://codeload.github.com/$repo/tar.gz/${branch:-master}" | tar -zx -C "$dir" --strip 1 && printf '.' || echo "Failed to download: $repo") &
done
wait
@@ -294,11 +294,11 @@ PACKS="
python3 build.py
rm -rf tmp
-rm -rf "${DIRS_RM[@]}"
mkdir tmp
printf "Downloading packs..."
download "$(sed '/^#/d' <<<"$PACKS")"
+rm -rf "${DIRS_RM[@]}"
extract "$(sed '/^#/d' <<<"$PACKS")"
update_readme