@@ -355,24 +355,6 @@ load_config() {
355355}
356356
357357
358- # 作業ディレクトリを削除
359- remove_work () {
360- if [[ -d " ${work_dir} " ]]; then
361- remove " $( ls ${work_dir} /* | grep " build.make" ) "
362- remove " ${work_dir} " /pacman-* .conf
363- remove " ${work_dir} /efiboot"
364- remove " ${work_dir} /iso"
365- remove " ${work_dir} /${arch} "
366- remove " ${work_dir} /packages.list"
367- remove " ${work_dir} /packages-full.list"
368- # remove "${rebuildfile}"
369- if [[ -z $( ls $( realpath " ${work_dir} " ) /* 2> /dev/null) ]]; then
370- remove ${work_dir}
371- fi
372- fi
373- }
374-
375-
376358# Display channel list
377359show_channel_list () {
378360 local i
@@ -427,7 +409,7 @@ prepare_build() {
427409 trap_remove_work () {
428410 local status=${?}
429411 echo
430- remove_work
412+ remove " ${work_dir} "
431413 exit ${status}
432414 }
433415 trap ' trap_remove_work' 1 2 3 15
@@ -1000,7 +982,7 @@ make_boot() {
1000982 if [[ ! " ${kernel} " = " core" ]]; then
1001983 cp " ${work_dir} /${arch} /airootfs/boot/vmlinuz-linux-${kernel} " " ${work_dir} /iso/${install_dir} /boot/${arch} /vmlinuz-linux-${kernel} "
1002984 else
1003- cp " ${work_dir} /${arch} /airootfs/boot/vmlinuz-linux" " ${work_dir} /iso/${install_dir} /boot/${arch} /vmlinuz"
985+ cp " ${work_dir} /${arch} /airootfs/boot/vmlinuz-linux" " ${work_dir} /iso/${install_dir} /boot/${arch} /vmlinuz-linux "
1004986 fi
1005987}
1006988
@@ -1009,7 +991,7 @@ make_boot_extra() {
1009991 cp " ${work_dir} /${arch} /airootfs/boot/intel-ucode.img" " ${work_dir} /iso/${install_dir} /boot/intel_ucode.img"
1010992 cp " ${work_dir} /${arch} /airootfs/usr/share/licenses/intel-ucode/LICENSE" " ${work_dir} /iso/${install_dir} /boot/intel_ucode.LICENSE"
1011993 cp " ${work_dir} /${arch} /airootfs/boot/amd-ucode.img" " ${work_dir} /iso/${install_dir} /boot/amd_ucode.img"
1012- cp " ${work_dir} /${arch} /airootfs/usr/share/licenses/amd-ucode/LICENSE" " ${work_dir} /iso/${install_dir} /boot/amd_ucode.LICENSE"
994+ cp " ${work_dir} /${arch} /airootfs/usr/share/licenses/amd-ucode/LICENSE.amd-ucode " " ${work_dir} /iso/${install_dir} /boot/amd_ucode.LICENSE"
1013995}
1014996
1015997# Prepare /${install_dir}/boot/syslinux
@@ -1313,7 +1295,7 @@ if [[ -d "${script_path}/.git" ]]; then
13131295fi
13141296
13151297# Show config message
1316- [[ -f " ${defaultconfig} " ]] && _msg_debug " The settings have been overwritten by the ${defaultconfig} "
1298+ [[ -f " ${defaultconfig} " ]] && _msg_debug " Use the default configuration file ( ${defaultconfig} ). "
13171299
13181300# Debug mode
13191301mkalteriso_option=" -a ${arch} -v"
@@ -1387,7 +1369,7 @@ if [[ -n "${1}" ]]; then
13871369 fi
13881370 fi
13891371
1390- if [[ ! " ${channel_name} " == " rebuild" ]]; then
1372+ if [[ ! " ${channel_name} " == " rebuild" ]] && [[ ! " ${channel_name} " == " clean " ]] ; then
13911373 _msg_debug " channel path is ${script_path} /channels/${channel_name} "
13921374 fi
13931375fi
@@ -1413,7 +1395,8 @@ if [[ "${channel_name}" = "clean" ]]; then
14131395 remove " ${script_path} /menuconfig/build"
14141396 remove " ${script_path} /system/cpp-src/mkalteriso/build"
14151397 remove " ${script_path} /menuconfig-script/kernel_choice"
1416- remove_work
1398+ remove " ${work_dir%/ } " /*
1399+ remove " ${work_dir} "
14171400 remove " ${rebuildfile} "
14181401 remove " ${script_path} /temp"
14191402 exit 0
@@ -1474,5 +1457,5 @@ run_once make_prepare
14741457run_once make_iso
14751458
14761459if [[ " ${cleaning} " = true ]]; then
1477- remove_work
1460+ remove " ${work_dir} "
14781461fi
0 commit comments