fix: Shellcheck warning

This commit is contained in:
Kroese 2025-09-17 16:16:34 +02:00 committed by GitHub
parent cfc053a62c
commit fdd102f2f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,7 +21,7 @@ skipInstall() {
if [ -n "$previous" ]; then if [ -n "$previous" ]; then
if [[ "${STORAGE,,}/${previous,,}" != "${iso,,}" ]]; then if [[ "${STORAGE,,}/${previous,,}" != "${iso,,}" ]]; then
if !hasDisk; then if ! hasDisk; then
rm -f "$STORAGE/$previous" rm -f "$STORAGE/$previous"
return 1 return 1
@ -53,7 +53,7 @@ skipInstall() {
[ -f "$STORAGE/$previous" ] && mv -f "$STORAGE/$previous" "$dir/" [ -f "$STORAGE/$previous" ] && mv -f "$STORAGE/$previous" "$dir/"
find "$STORAGE" -maxdepth 1 -type f -iname 'windows.*' -exec mv -n {} "$dir/" \; find "$STORAGE" -maxdepth 1 -type f -iname 'windows.*' -exec mv -n {} "$dir/" \;
find "$STORAGE" -maxdepth 1 -type f -iname '*.rom' -or -iname '*.vars' -exec mv -n {} "$dir/" \; find "$STORAGE" -maxdepth 1 -type f \( -iname '*.rom' -or -iname '*.vars' \) -exec mv -n {} "$dir/" \;
return 1 return 1
@ -132,8 +132,8 @@ startInstall() {
rm -f "$BOOT" rm -f "$BOOT"
find "$STORAGE" -maxdepth 1 -type f -iname '*.rom' -or -iname '*.vars' -delete
find "$STORAGE" -maxdepth 1 -type f -iname 'windows.*' -not -iname '*.iso' -delete find "$STORAGE" -maxdepth 1 -type f -iname 'windows.*' -not -iname '*.iso' -delete
find "$STORAGE" -maxdepth 1 -type f \( -iname '*.rom' -or -iname '*.vars' \) -delete
return 0 return 0
} }
@ -632,7 +632,7 @@ detectImage() {
warn "failed to locate 'sources' folder in ISO image, $FB" && return 1 warn "failed to locate 'sources' folder in ISO image, $FB" && return 1
fi fi
wim=$(find "$src" -maxdepth 1 -type f -iname install.wim -or -iname install.esd -print -quit) wim=$(find "$src" -maxdepth 1 -type f \( -iname install.wim -or -iname install.esd \) -print -quit)
if [ ! -f "$wim" ]; then if [ ! -f "$wim" ]; then
warn "failed to locate 'install.wim' or 'install.esd' in ISO image, $FB" && return 1 warn "failed to locate 'install.wim' or 'install.esd' in ISO image, $FB" && return 1
@ -932,7 +932,7 @@ updateImage() {
error "failed to locate 'sources' folder in ISO image, $FB" && return 1 error "failed to locate 'sources' folder in ISO image, $FB" && return 1
fi fi
wim=$(find "$src" -maxdepth 1 -type f -iname boot.wim -or -iname boot.esd -print -quit) wim=$(find "$src" -maxdepth 1 -type f \( -iname boot.wim -or -iname boot.esd \) -print -quit)
if [ ! -f "$wim" ]; then if [ ! -f "$wim" ]; then
error "failed to locate 'boot.wim' or 'boot.esd' in ISO image, $FB" && return 1 error "failed to locate 'boot.wim' or 'boot.esd' in ISO image, $FB" && return 1