From b7f12ade03dc53788ed21189fd355582eb9490bb Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 30 Jun 2024 19:22:58 +0100 Subject: vendor.sh: remove mkdirs() merge it into the only calling function Signed-off-by: Leah Rowe --- include/vendor.sh | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/include/vendor.sh b/include/vendor.sh index 2c5f7c74..e282eedd 100755 --- a/include/vendor.sh +++ b/include/vendor.sh @@ -83,23 +83,19 @@ fetch() download "$dl" "$dl_bkup" "$_dl" "$dlsum" x_ rm -Rf "${_dl}_extracted" - mkdirs "$_dest" "extract_$dl_type" || return 0 + e "$_dest" f && return 0 + + mkdir -p "${_dest%/*}" || $err "mkdirs: !mkdir -p ${_dest%/*}" + remkdir "$appdir" + extract_archive "$_dl" "$appdir" || [ "$dl_type" = "e6400vga" ] || \ + $err "mkdirs $_dest $dl_type: !extract" + eval "extract_$dl_type" set -u -e e "$_dest" f missing && $err "!extract_$dl_type"; return 0 } -mkdirs() -{ - e "$1" f && return 1 - - mkdir -p "${1%/*}" || $err "mkdirs: !mkdir -p ${1%/*}" - remkdir "$appdir" - extract_archive "$_dl" "$appdir" || [ "$2" = "extract_e6400vga" ] || \ - $err "mkdirs $1 $2: !extract"; return 0 -} - extract_intel_me() { e "$mecleaner" f not && $err "$cbdir: me_cleaner missing" -- cgit v1.2.1