summaryrefslogtreecommitdiff
path: root/include/get.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-09-12 14:27:14 +0100
committerLeah Rowe <leah@libreboot.org>2026-09-12 14:29:11 +0100
commita32374f6cc670789732628dfa003baf51374c7a2 (patch)
tree5f25daa59547696ebcbfde6768328a6d6835bb8a /include/get.sh
parent897c2667af32342a39093733315a25cc2e0296e8 (diff)
more cleanup
this will be the last time, i promise Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/get.sh')
-rw-r--r--include/get.sh11
1 files changed, 4 insertions, 7 deletions
diff --git a/include/get.sh b/include/get.sh
index ea03b07f..f10c8597 100644
--- a/include/get.sh
+++ b/include/get.sh
@@ -140,11 +140,10 @@ try_fetch_git()
x_ xbmkdir "${5%/*}" "${cached%/*}"
- if ! try_$2 "$cached" "$@"; then
+ try_$2 "$cached" "$@" || \
return 1
- elif [ ! -d "$cached" ]; then
+ [ ! -d "$cached" ] && \
return 1
- fi
if [ ! -d "$5" ]; then
tmpclone "$cached" "$5" "$6" "$7" || \
@@ -166,10 +165,9 @@ try_fetch_curl()
x_ rm -f "$cached"
fi
- [ ! -f "$cached" ] && \
- if ! try_$2 "$cached" "$@"; then
+ [ -f "$cached" ] || \
+ try_$2 "$cached" "$@" || \
return 1
- fi
[ -f "$5" ] && \
if bad_checksum "$6" "$5" 2>/dev/null; then
@@ -180,7 +178,6 @@ try_fetch_curl()
return 1
elif bad_checksum "$6" "$cached"; then
x_ rm -f "$cached"
-
return 1
fi