- if [ $make = iso ]; then
- cabextract "$waik_dir"/wAIK${arch}.msi -F F_WINPE_${arch}_etfsboot.com -p \
- > "$tmp_dir"/etfsboot.com || stat_fail
+
+ if [ -f "$waik_dir"/wAIK${arch}.msi ]; then
+ if [ $make = iso ]; then
+ cabextract "$waik_dir"/wAIK${arch}.msi -F F_WINPE_${arch}_etfsboot.com -p \
+ > "$tmp_dir"/etfsboot.com || stat_fail
+ fi
+ cabextract "$waik_dir"/wAIK${arch}.msi -F F${arch_id}_BOOTMGR -p \
+ > "$tmp_dir"/bootmgr || stat_fail
+ cabextract "$waik_dir"/wAIK${arch}.msi -F F_WINPE_${arch}_boot.sdi -p \
+ > "$tmp_dir"/boot/boot.sdi || stat_fail
+ cabextract "$waik_dir"/wAIK${arch}.msi -F F_WINPE_${arch}_bcd -p \
+ > "$tmp_dir"/boot/bcd || stat_fail
+ # The WAIK supplement disc has a different structure
+ else
+ # Note: fuseiso, mount default to map=normal i.e. lowercase
+ if [ $make = iso ]; then
+ cp "$waik_dir"/${arch,,}/boot/etfsboot.com $tmp_dir/etfsboot.com || stat_fail
+ fi
+ cp "$waik_dir"/${arch,,}/bootmgr $tmp_dir/bootmgr || stat_fail
+ cp "$waik_dir"/${arch,,}/boot/boot.sdi $tmp_dir/boot/boot.sdi || stat_fail
+ cp "$waik_dir"/${arch,,}/boot/bcd $tmp_dir/boot/bcd || stat_fail