Skip to content

Commit

Permalink
fix: Shellcheck (dockur#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese committed Feb 16, 2024
1 parent 8c148eb commit 41bab9d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -651,16 +651,16 @@ detectImage() {
return 0
fi

local src=$(find "$dir" -maxdepth 1 -type d -iname sources | head -n 1)
local src loc tag result name name2 desc
src=$(find "$dir" -maxdepth 1 -type d -iname sources | head -n 1)

if [ ! -d "$src" ]; then
warn "failed to locate 'sources' folder in ISO image, $FB"
BOOT_MODE="windows_legacy"
return 1
fi

local tag result name name2 desc
local loc=$(find "$src" -maxdepth 1 -type f -iname install.wim | head -n 1)
loc=$(find "$src" -maxdepth 1 -type f -iname install.wim | head -n 1)
[ ! -f "$loc" ] && loc=$(find "$src" -maxdepth 1 -type f -iname install.esd | head -n 1)

if [ ! -f "$loc" ]; then
Expand Down Expand Up @@ -892,22 +892,22 @@ updateImage() {
local iso="$1"
local dir="$2"
local asset="/run/assets/$3"
local index result
local path src loc index result

[ ! -f "$asset" ] && return 0

local path=$(find "$dir" -maxdepth 1 -type f -iname autounattend.xml | head -n 1)
path=$(find "$dir" -maxdepth 1 -type f -iname autounattend.xml | head -n 1)
[ -n "$path" ] && cp "$asset" "$path"

local src=$(find "$dir" -maxdepth 1 -type d -iname sources | head -n 1)
src=$(find "$dir" -maxdepth 1 -type d -iname sources | head -n 1)

if [ ! -d "$src" ]; then
warn "failed to locate 'sources' folder in ISO image, $FB"
BOOT_MODE="windows_legacy"
return 1
fi

local loc=$(find "$src" -maxdepth 1 -type f -iname boot.wim | head -n 1)
loc=$(find "$src" -maxdepth 1 -type f -iname boot.wim | head -n 1)
[ ! -f "$loc" ] && loc=$(find "$src" -maxdepth 1 -type f -iname boot.esd | head -n 1)

if [ ! -f "$loc" ]; then
Expand Down

0 comments on commit 41bab9d

Please sign in to comment.