summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSertonix <sertonix@posteo.net>2024-08-05 12:32:42 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2024-09-06 12:19:56 +0000
commit619b636a4e50c73561352e24f4fe660f661c030c (patch)
treeb8b3bc0c1fcaf4237130db0989268ad2c7f4b9b1
parent5147450891cc9db4c2615b7c0ac4b978bd3797c8 (diff)
downloadaports-619b636a4e50c73561352e24f4fe660f661c030c.zip
scripts/mkimage.sh: simplify for loops
-rwxr-xr-xscripts/mkimg.base.sh24
1 files changed, 9 insertions, 15 deletions
diff --git a/scripts/mkimg.base.sh b/scripts/mkimg.base.sh
index 681806d9868..66e3c8c5e7d 100755
--- a/scripts/mkimg.base.sh
+++ b/scripts/mkimg.base.sh
@@ -17,11 +17,9 @@ build_kernel() {
--repositories-file "$APKROOT/etc/apk/repositories" \
"$DESTDIR" \
|| return 1
- if [ -n "$boot_addons" ]; then
- for _add in $boot_addons; do
- apk fetch --root "$APKROOT" --quiet --stdout $_add | tar -C "${DESTDIR}" -zx boot/
- done
- fi
+ for _add in $boot_addons; do
+ apk fetch --root "$APKROOT" --quiet --stdout $_add | tar -C "${DESTDIR}" -zx boot/
+ done
}
section_kernels() {
@@ -107,11 +105,9 @@ syslinux_gen_config() {
for _f in $kernel_flavors; do
if [ -z "${xen_params+set}" ]; then
_initrd="/boot/initramfs-$_f"
- if [ -n "$initrd_ucode" ]; then
- for _p in $initrd_ucode; do
- _initrd="$_p,$_initrd"
- done
- fi
+ for _p in $initrd_ucode; do
+ _initrd="$_p,$_initrd"
+ done
cat <<- EOF
@@ -140,11 +136,9 @@ grub_gen_config() {
for _f in $kernel_flavors; do
if [ -z "${xen_params+set}" ]; then
_initrd="/boot/initramfs-$_f"
- if [ -n "$initrd_ucode" ]; then
- for _p in $initrd_ucode; do
- _initrd="$_p $_initrd"
- done
- fi
+ for _p in $initrd_ucode; do
+ _initrd="$_p $_initrd"
+ done
cat <<- EOF