@@ -131,7 +131,7 @@ get_url()
131131 esac
132132}
133133
134- trap " cleanup" 1 2 3 6 9 14 15 EXIT
134+ trap " cleanup" 1 2 3 6 14 15 EXIT
135135
136136load_vars
137137
223223fi
224224
225225if [ -n " $cos_config " ] && [ -e " $cos_config " ]; then
226+ # shellcheck source=/dev/null
226227 source " $cos_config "
227228fi
228229
@@ -283,7 +284,7 @@ ensure_dir_structure $TARGET
283284# Download the container image
284285if [ -z " $directory " ]; then
285286 echo " >>> Downloading container image"
286- elemental pull-image $( (( $ local_build == 'true')) && printf %s ' --local' ) $container_image $TARGET
287+ elemental pull-image $( (( local_build == 'true')) && printf %s ' --local' ) $container_image $TARGET
287288else
288289 echo " >>> Copying files from $directory "
289290 rsync -axq --exclude=' host' --exclude=' mnt' --exclude=' proc' --exclude=' sys' --exclude=' dev' --exclude=' tmp' ${directory} / $TARGET
@@ -354,7 +355,7 @@ sgdisk -n 2:0:+${state_size}M -c 2:state -t 2:8300 ${output_image}
354355if [ " $disable_lvm " == ' true' ]; then
355356sgdisk -n 3:0:+${recovery_size} M -c 3:recovery -t 3:8300 ${output_image}
356357else
357- sgdisk -n 3:0:+$(( ${ recovery_size} + ${ oem_size} )) M -c 3:lvm -t 3:8e00 ${output_image}
358+ sgdisk -n 3:0:+$(( recovery_size + oem_size )) M -c 3:lvm -t 3:8e00 ${output_image}
358359fi
359360sgdisk -n 4:0:+64M -c 4:persistent -t 4:8300 ${output_image}
360361
366367
367368# Prepare the image and copy over the files
368369
369- export DRIVE=$( losetup -f " ${output_image} " --show)
370+ DRIVE=$( losetup -f " ${output_image} " --show)
371+ export DRIVE
370372if [ -z " ${DRIVE} " ]; then
371373 echo " Cannot execute losetup for $output_image "
372374 exit 1
0 commit comments