feat: Convert line endings (#494)

This commit is contained in:
Kroese 2024-05-15 15:57:16 +02:00 committed by GitHub
parent 08055530ec
commit 0a5d491177
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -936,7 +936,7 @@ copyOEM() {
local dir="$1" local dir="$1"
local folder="/oem" local folder="/oem"
local src local src dest file
[ ! -d "$folder" ] && folder="/OEM" [ ! -d "$folder" ] && folder="/OEM"
[ ! -d "$folder" ] && folder="$STORAGE/oem" [ ! -d "$folder" ] && folder="$STORAGE/oem"
@ -952,13 +952,16 @@ copyOEM() {
error "failed to locate 'sources' folder in ISO image!" && return 1 error "failed to locate 'sources' folder in ISO image!" && return 1
fi fi
local dest="$src/\$OEM\$/\$1/" dest="$src/\$OEM\$/\$1/"
mkdir -p "$dest" mkdir -p "$dest"
if ! cp -r "$folder" "$dest"; then if ! cp -r "$folder" "$dest"; then
error "Failed to copy OEM folder!" && return 1 error "Failed to copy OEM folder!" && return 1
fi fi
file=$(find "$dest" -maxdepth 1 -type f -iname install.bat | head -n 1)
[ -f "$file" ] && unix2dos -q "$file"
return 0 return 0
} }