From f2d53eb842d7d843149b004c51c23739521f732d Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 28 Jun 2024 23:10:22 +0100 Subject: vendor.sh: condense fetch() a bit Signed-off-by: Leah Rowe --- include/vendor.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/vendor.sh b/include/vendor.sh index cb06ec9d..36bea3e3 100755 --- a/include/vendor.sh +++ b/include/vendor.sh @@ -92,8 +92,7 @@ fetch() [ "$5" = "/dev/null" ] && return 0 [ "${5# }" = "$5" ] || $err "fetch: space not allowed in _dest: '$5'" [ "${5#/}" = "$5" ] || $err "fetch: absolute path not allowed: '$5'" - _dest="${5##*../}" - _dl="$vendir/cache/$dlsum" + _dest="${5##*../}"; _dl="$vendir/cache/$dlsum" download "$dl" "$dl_bkup" "$_dl" "$dlsum" @@ -102,8 +101,7 @@ fetch() eval "extract_$dl_type" set -u -e - [ -f "$_dest" ] && return 0 - $err "extract_$dl_type (fetch): missing file: '$_dest'" + e "$_dest" f missing && $err "!extract_$dl_type"; return 0 } mkdirs() -- cgit v1.2.1