Skip to content

Commit c718520

Browse files
committed
[fix] : Fixed function return code
1 parent c1607c8 commit c718520

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

build.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,8 @@ prepare_env() {
396396
exit ${status}
397397
}
398398
trap '_trap_remove_work' 1 2 3 15
399+
400+
return 0
399401
}
400402

401403

@@ -418,6 +420,8 @@ show_settings() {
418420
fi
419421
trap 1 2 3 15
420422
trap 'umount_trap' 1 2 3 15
423+
424+
return 0
421425
}
422426

423427

@@ -524,6 +528,8 @@ prepare_build() {
524528
# Set argument of aur.sh and pkgbuild.sh
525529
[[ "${bash_debug}" = true ]] && makepkg_script_args+=("-x")
526530
[[ "${pacman_debug}" = true ]] && makepkg_script_args+=("-d")
531+
532+
return 0
527533
}
528534

529535

@@ -549,6 +555,8 @@ make_pacman_conf() {
549555
if [[ -n "$(find "${cache_dir}" -maxdepth 1 -name '*.pkg.tar.*' 2> /dev/null)" ]]; then
550556
msg_info "Use cached package files in ${cache_dir}"
551557
fi
558+
559+
return 0
552560
}
553561

554562
# Base installation (airootfs)
@@ -562,6 +570,7 @@ make_basefs() {
562570
msg_info "Mounting ${airootfs_dir}.img on ${airootfs_dir}"
563571
mount_airootfs
564572
msg_info "Done!"
573+
return 0
565574
}
566575

567576
# Additional packages (airootfs)
@@ -577,6 +586,8 @@ make_packages_repo() {
577586

578587
# Upgrade cached package
579588
# _run_with_pacmanconf _chroot_run pacman -Syy --noconfirm --config "/etc/alteriso-pacman.conf"
589+
590+
return 0
580591
}
581592

582593
make_packages_aur() {
@@ -594,6 +605,8 @@ make_packages_aur() {
594605

595606
# Remove script
596607
remove "${airootfs_dir}/root/aur.sh"
608+
609+
return 0
597610
}
598611

599612
make_pkgbuild() {
@@ -617,6 +630,8 @@ make_pkgbuild() {
617630

618631
# Remove script
619632
remove "${airootfs_dir}/root/pkgbuild.sh"
633+
634+
return 0
620635
}
621636

622637
# Customize installation (airootfs)
@@ -692,6 +707,8 @@ make_customize_airootfs() {
692707

693708
# /root permission https://github.com/archlinux/archiso/commit/d39e2ba41bf556674501062742190c29ee11cd59
694709
chmod -f 750 "${airootfs_dir}/root"
710+
711+
return 0
695712
}
696713

697714
# Copy mkinitcpio archiso hooks and build initramfs (airootfs)
@@ -722,13 +739,17 @@ make_setup_mkinitcpio() {
722739
if [[ "${gpg_key}" ]]; then
723740
exec 17<&-
724741
fi
742+
743+
return 0
725744
}
726745

727746
# Prepare kernel/initramfs ${install_dir}/boot/
728747
make_boot() {
729748
mkdir -p "${isofs_dir}/${install_dir}/boot/${arch}"
730749
cp "${airootfs_dir}/boot/archiso.img" "${isofs_dir}/${install_dir}/boot/${arch}/archiso.img"
731750
cp "${airootfs_dir}/boot/${kernel_filename}" "${isofs_dir}/${install_dir}/boot/${arch}/${kernel_filename}"
751+
752+
return 0
732753
}
733754

734755
# Add other aditional/extra files to ${install_dir}/boot/
@@ -753,6 +774,8 @@ make_boot_extra() {
753774
fi
754775
done
755776
msg_info "Done!"
777+
778+
return 0
756779
}
757780

758781
# Prepare /${install_dir}/boot/syslinux
@@ -820,6 +843,8 @@ make_syslinux() {
820843
fi
821844
find "${airootfs_dir}/usr/lib/modules" -name 'modules.alias' -print -exec gzip -c -9 '{}' ';' -quit > "${isofs_dir}/syslinux/hdt/modalias.gz"
822845
fi
846+
847+
return 0
823848
}
824849

825850
# Prepare /isolinux
@@ -828,6 +853,8 @@ make_isolinux() {
828853
sed "s|%INSTALL_DIR%|${install_dir}|g" "${script_path}/system/isolinux.cfg" > "${isofs_dir}/syslinux/isolinux.cfg"
829854
install -m 0644 -- "${airootfs_dir}/usr/lib/syslinux/bios/isolinux.bin" "${isofs_dir}/syslinux/"
830855
install -m 0644 -- "${airootfs_dir}/usr/lib/syslinux/bios/isohdpfx.bin" "${isofs_dir}/syslinux/"
856+
857+
return 0
831858
}
832859

833860
# Prepare /EFI
@@ -880,6 +907,8 @@ efi /EFI/shell_${_efi_shell_arch}.efi
880907
EOF
881908
done
882909
fi
910+
911+
return 0
883912
}
884913

885914
# Prepare efiboot.img::/EFI for "El Torito" EFI boot mode
@@ -935,6 +964,8 @@ make_efiboot() {
935964

936965
find "${isofs_dir}/EFI" -maxdepth 1 -mindepth 1 -name "shell*.efi" -printf "%p\0" | xargs -0 -I{} cp {} "${build_dir}/efiboot/EFI/"
937966
umount -d "${build_dir}/efiboot"
967+
968+
return 0
938969
}
939970

940971
# Compress tarball
@@ -972,6 +1003,8 @@ make_tarball() {
9721003
if [[ "${noiso}" = true ]]; then
9731004
msg_info "The password for the live user and root is ${password}."
9741005
fi
1006+
1007+
return 0
9751008
}
9761009

9771010

@@ -1012,6 +1045,8 @@ make_prepare() {
10121045
if [[ "${cleaning}" = true ]]; then
10131046
remove "${airootfs_dir}" "${airootfs_dir}.img"
10141047
fi
1048+
1049+
return 0
10151050
}
10161051

10171052
make_alteriso_info(){
@@ -1024,6 +1059,8 @@ make_alteriso_info(){
10241059
fi
10251060
"${tools_dir}/alteriso-info.sh" -a "${arch}" -b "${boot_splash}" -c "${channel_name%.add}" -d "${iso_publisher}" -k "${kernel}" -o "${os_name}" -p "${password}" -u "${username}" -v "${_version}" > "${_info_file}"
10261061
fi
1062+
1063+
return 0
10271064
}
10281065

10291066
# Add files to the root of isofs
@@ -1034,6 +1071,8 @@ make_overisofs() {
10341071
for _isofs in "${_over_isofs_list[@]}"; do
10351072
if [[ -d "${_isofs}" ]]; then cp -af "${_isofs}"/* "${isofs_dir}"; fi
10361073
done
1074+
1075+
return 0
10371076
}
10381077

10391078
# Build ISO
@@ -1067,6 +1106,8 @@ make_iso() {
10671106
msg_info "Done! | $(ls -sh -- "${out_dir}/${iso_filename}")"
10681107

10691108
msg_info "The password for the live user and root is ${password}."
1109+
1110+
return 0
10701111
}
10711112

10721113

0 commit comments

Comments
 (0)