feat: Check for driver availability

This commit is contained in:
Kroese 2024-09-25 14:55:30 +02:00 committed by GitHub
parent ffbe46af3d
commit 6654bf54f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1895,12 +1895,12 @@ prepareInstall() {
local target
[[ "${arch,,}" == "x86" ]] && target="$dir/I386" || target="$dir/AMD64"
cp "$drivers/viostor/$driver/$arch/viostor.sys" "$target"
if [ ! -f "$drivers/viostor/$driver/$arch/viostor.sys" ]; then
error "Failed to locate required storage drivers!" && return 1
fi
cp "$drivers/viostor/$driver/$arch/viostor.sys" "$target"
mkdir -p "$dir/\$OEM\$/\$1/Drivers/viostor"
cp "$drivers/viostor/$driver/$arch/viostor.cat" "$dir/\$OEM\$/\$1/Drivers/viostor"
cp "$drivers/viostor/$driver/$arch/viostor.inf" "$dir/\$OEM\$/\$1/Drivers/viostor"