Skip to content

Commit 6a1c68c

Browse files
committed
[update] : Use test instead of "if"
1 parent 09d507d commit 6a1c68c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

build.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -822,8 +822,8 @@ make_syslinux() {
822822
sed -i "s|$(cat "${isofs_dir}/syslinux/archiso_sys_load.cfg" | grep "${1}")||g" "${isofs_dir}/syslinux/archiso_sys_load.cfg"
823823
}
824824

825-
if [[ "${norescue_entry}" = true ]]; then _remove_config archiso_sys_rescue.cfg; fi
826-
if [[ "${memtest86}" = false ]]; then _remove_config memtest86.cfg; fi
825+
[[ "${norescue_entry}" = true ]] && _remove_config archiso_sys_rescue.cfg
826+
[[ "${memtest86}" = false ]] && _remove_config memtest86.cfg
827827

828828
# copy files
829829
cp "${airootfs_dir}/usr/lib/syslinux/bios/"*.c32 "${isofs_dir}/syslinux"
@@ -1032,9 +1032,7 @@ make_prepare() {
10321032

10331033
umount_work
10341034

1035-
if [[ "${cleaning}" = true ]]; then
1036-
remove "${airootfs_dir}" "${airootfs_dir}.img"
1037-
fi
1035+
[[ "${cleaning}" = true ]] && remove "${airootfs_dir}" "${airootfs_dir}.img"
10381036

10391037
return 0
10401038
}
@@ -1059,7 +1057,7 @@ make_overisofs() {
10591057
_over_isofs_list=("${channel_dir}/over_isofs.any""${channel_dir}/over_isofs.${arch}")
10601058
for_module '_over_isofs_list+=("${module_dir}/{}/over_isofs.any""${module_dir}/{}/over_isofs.${arch}")'
10611059
for _isofs in "${_over_isofs_list[@]}"; do
1062-
if [[ -d "${_isofs}" ]]; then cp -af "${_isofs}"/* "${isofs_dir}"; fi
1060+
[[ -d "${_isofs}" ]] && cp -af "${_isofs}"/* "${isofs_dir}"
10631061
done
10641062

10651063
return 0

0 commit comments

Comments
 (0)