done
}
+_run_cleansh(){
+ "${tools_dir}/clean.sh" -o -w "$(realpath "${build_dir}")" "$([[ "${debug}" = true ]] && echo -n "-d")" "$([[ "${noconfirm}" = true ]] && echo -n "-n")"
+}
+
# Check the build environment and create a directory.
prepare_env() {
if [[ "${normwork}" = false ]]; then
umount_chroot_advance
msg_info "Deleting the contents of ${build_dir}..."
- "${tools_dir}/clean.sh" -o -w "$(realpath "${build_dir}")" "$([[ "${debug}" = true ]] && echo -n "-d")"
+ _run_cleansh
fi
# 強制終了時に作業ディレクトリを削除する
_trap_remove_work() {
local status=${?}
if [[ "${normwork}" = false ]]; then
- echo; "${tools_dir}/clean.sh" -o -w "$(realpath "${build_dir}")" "$([[ "${debug}" = true ]] && echo -n "-d")"
+ echo; _run_cleansh
fi
exit ${status}
}
channel_name="${1}"
channel_dir="${channel_dir}.add"
elif [[ "${channel_name}" = "clean" ]]; then
- "${tools_dir}/clean.sh" -w "$(realpath "${build_dir}")" "$([[ "${debug}" = true ]] && echo -n "-d")"
+ _run_cleansh
exit 0
fi
run_once make_iso
fi
-[[ "${cleaning}" = true ]] && "${tools_dir}/clean.sh" -o -w "$(realpath "${build_dir}")" "$([[ "${debug}" = true ]] && echo -n "-d")"
+[[ "${cleaning}" = true ]] && _run_cleansh
exit 0