Skip to content

Commit 0576863

Browse files
committed
release/amd64: cleanup code duplication
Approved by: imp (mentor) Pull Request: #1571 Closes: #1571
1 parent 51affb7 commit 0576863

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

release/amd64/make-memstick.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,9 @@ fi
6262
# Make an ESP in a file.
6363
espfilename=$(mktemp /tmp/efiboot.XXXXXX)
6464
if [ -f "${BASEBITSDIR}/boot/loader_ia32.efi" ]; then
65-
make_esp_file ${espfilename} ${fat32min} ${BASEBITSDIR}/boot/loader.efi bootx64 \
66-
${BASEBITSDIR}/boot/loader_ia32.efi bootia32
67-
else
68-
make_esp_file ${espfilename} ${fat32min} ${BASEBITSDIR}/boot/loader.efi
65+
extra_args="${BASEBITSDIR}/boot/loader_ia32.efi bootia32"
6966
fi
67+
make_esp_file ${espfilename} ${fat32min} ${BASEBITSDIR}/boot/loader.efi bootx64 ${extra_args}
7068

7169
${MKIMG} -s mbr \
7270
-b ${BASEBITSDIR}/boot/mbr \

release/amd64/mkisoimages.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,9 @@ if [ "$1" = "-b" ]; then
5454
# ESP file size in KB.
5555
espsize="2048"
5656
if [ -f "${BASEBITSDIR}/boot/loader_ia32.efi" ]; then
57-
make_esp_file ${espfilename} ${espsize} ${BASEBITSDIR}/boot/loader.efi bootx64 \
58-
${BASEBITSDIR}/boot/loader_ia32.efi bootia32
59-
else
60-
make_esp_file ${espfilename} ${espsize} ${BASEBITSDIR}/boot/loader.efi
57+
extra_args="${BASEBITSDIR}/boot/loader_ia32.efi bootia32"
6158
fi
59+
make_esp_file ${espfilename} ${espsize} ${BASEBITSDIR}/boot/loader.efi bootx64 ${extra_args}
6260
bootable="$bootable -o bootimage=i386;${espfilename} -o no-emul-boot -o platformid=efi"
6361

6462
shift

0 commit comments

Comments
 (0)