summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-30 19:22:58 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-30 19:22:58 +0100
commitb7f12ade03dc53788ed21189fd355582eb9490bb (patch)
treebf47401c0a235af64b77f7db1f6a7be391971331 /include
parent0018600d6e21f69eb00651e88074920b2a8f62d7 (diff)
vendor.sh: remove mkdirs()
merge it into the only calling function Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
-rwxr-xr-xinclude/vendor.sh18
1 files 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"