echo " General options:"
echo " -b | --boot-splash Enable boot splash"
echo " -e | --cleanup | --cleaning Enable post-build cleaning"
+ echo " --tarball Build rootfs in tar.xz format"
echo " -h | --help This help message and exit"
echo
echo " -c | --comp-type <comp_type> Set SquashFS compression type (gzip, lzma, lzo, xz, zstd)"
echo " --nochkver NO check the version of the channel"
echo " --noloopmod No check and load kernel module automatically"
echo " --nodepend No check package dependencies before building"
+ echo " --noiso No build iso image (Use with --tarball)"
echo " --shmkalteriso Use the shell script version of mkalteriso"
if [[ -n "${1:-}" ]]; then exit "${1}"; fi
}
check_bool customized_username
check_bool noloopmod
check_bool nochname
+ check_bool tarball
+ check_bool noiso
check_bool noaur
check_bool customized_syslinux
umount -d "${work_dir}/efiboot"
}
+# Compress tarball
+make_tarball() {
+ cp -a -l -f "${work_dir}/${arch}/airootfs" "${work_dir}"
+
+ if [[ -f "${work_dir}/${arch}/airootfs/root/optimize_for_tarball.sh" ]]; then
+ chmod 755 "${work_dir}/${arch}/airootfs/root/optimize_for_tarball.sh"
+ # Execute optimize_for_tarball.sh.
+ ${mkalteriso} ${mkalteriso_option} \
+ -w "${work_dir}/${arch}" \
+ -C "${work_dir}/pacman-${arch}.conf" \
+ -D "${install_dir}" \
+ -r "/root/optimize_for_tarball.sh" \
+ run
+ fi
+
+ ARCHISO_GNUPG_FD=${gpg_key:+17} ${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" -r "mkinitcpio -p ${kernel_mkinitcpio_profile}" run
+
+ remove "${work_dir}/${arch}/airootfs/root/optimize_for_tarball.sh"
+
+ ${mkalteriso} ${mkalteriso_option} -w "${work_dir}" -D "${install_dir}" -L "${iso_label}" -P "${iso_publisher}" -A "${iso_application}" -o "${out_dir}" tarball "$(echo ${iso_filename} | sed 's/\.[^\.]*$//' | sed "s/dual/${arch}/g").tar.xz"
+
+ remove "${work_dir}/airootfs"
+ if [[ "${noiso}" = true ]]; then
+ msg_info "The password for the live user and root is ${password}."
+ fi
+}
+
# Build airootfs filesystem image
make_prepare() {
# Parse options
ARGUMENT="${@}"
_opt_short="bc:deg:hjk:l:o:p:rt:u:w:x"
-_opt_long="boot-splash,comp-type:,debug,cleaning,cleanup,gpgkey:,help,lang:,japanese,kernel:,out:,password:,comp-opts:,user:,work:,bash-debug,nocolor,noconfirm,nodepend,gitversion,shmkalteriso,msgdebug,noloopmod,noaur,nochkver,channellist,config:"
+_opt_long="boot-splash,comp-type:,debug,cleaning,cleanup,gpgkey:,help,lang:,japanese,kernel:,out:,password:,comp-opts:,user:,work:,bash-debug,nocolor,noconfirm,nodepend,gitversion,shmkalteriso,msgdebug,noloopmod,tarball,noiso,noaur,nochkver,channellist,config:"
OPT=$(getopt -o ${_opt_short} -l ${_opt_long} -- ${DEFAULT_ARGUMENT} ${ARGUMENT})
[[ ${?} != 0 ]] && exit 1
password="${2}"
shift 2
;;
+ -r | --tarball)
+ tarball=true
+ shift 1
+ ;;
-t | --comp-opts)
sfs_comp_opt="${2}"
shift 2
noloopmod=true
shift 1
;;
+ --noiso)
+ noiso=true
+ shift 1
+ ;;
--noaur)
noaur=true
shift 1
run_arch make_setup_mkinitcpio
run_arch make_syslinux
run_arch make_boot
- run_arch make_prepare
+ [[ "${noiso}" = false ]] && run_arch make_prepare
done
run_once make_boot_extra
run_once make_syslinux_loadfiles
run_once make_isolinux
run_once make_efi
run_once make_efiboot
-run_once make_iso
+if [[ "${tarball}" = true ]]; then
+ for arch in ${all_arch[@]}; do
+ run_arch make_tarball
+ done
+fi
+[[ "${noiso}" = false ]] && run_once make_iso
[[ "${cleaning}" = true ]] && remove_work
exit 0