From 0c848a903945a3f78892c32cec6937ff722a7e51 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 24 May 2024 20:29:41 +0200 Subject: [PATCH] Update install.sh --- src/install.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/install.sh b/src/install.sh index 7cea889..480dd10 100644 --- a/src/install.sh +++ b/src/install.sh @@ -833,14 +833,7 @@ copyOEM() { local dir="$1" local folder="/oem" - local drivers="$TMP/drivers" - local src file - - src=$(find "$dir" -maxdepth 1 -type d -iname sources | head -n 1) - - if [ ! -d "$src" ]; then - error "failed to locate 'sources' folder in ISO image!" && return 1 - fi + local src dest file [ ! -d "$folder" ] && folder="/OEM" [ ! -d "$folder" ] && folder="$STORAGE/oem" @@ -850,7 +843,13 @@ copyOEM() { local msg="Copying OEM folder to image..." info "$msg" && html "$msg" - local dest="$src/\$OEM\$/\$1/" + src=$(find "$dir" -maxdepth 1 -type d -iname sources | head -n 1) + + if [ ! -d "$src" ]; then + error "failed to locate 'sources' folder in ISO image!" && return 1 + fi + + dest="$src/\$OEM\$/\$1/" mkdir -p "$dest" if ! cp -r "$folder" "$dest"; then