Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2022-06-09 19:11:46 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2022-06-09 19:11:46 +0200
commit0307ce5fb53a9d978f015973eca1994106c43c66 (patch)
tree2f9286e43c0c226dae4fb55abdf709ccef8536e6
parent4da5628e585a8e3b28156163f8ae5a6436e0f16d (diff)
sogrep.in: error handling around solink mirror curl calls
-rwxr-xr-xsogrep.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/sogrep.in b/sogrep.in
index dfdd104..d1ca1a1 100755
--- a/sogrep.in
+++ b/sogrep.in
@@ -36,8 +36,11 @@ recache() {
local dbpath=${SOCACHE_DIR}/${arch}/${repo}.links.tar.gz
mkdir -p "${dbpath%/*}"
(( VERBOSE )) && echo "Fetching ${repo}.links.tar.gz..."
- curl -LR "${verbosity}" -o "${dbpath}" -z "${dbpath}" \
- "${SOLINKS_MIRROR}/${repo}/os/${arch}/${repo}.links.tar.gz"
+ if ! curl -fLR "${verbosity}" -o "${dbpath}" -z "${dbpath}" \
+ "${SOLINKS_MIRROR}/${repo}/os/${arch}/${repo}.links.tar.gz"; then
+ echo "error: failed to download links database for repo ${repo}"
+ exit 1
+ fi
done
done
}