Skip to content

Commit a696805

Browse files
committed
Merge branch 'dev' into dev-stable
2 parents 98a1840 + 68f131c commit a696805

File tree

37 files changed

+357
-140
lines changed

37 files changed

+357
-140
lines changed

allarch.sh

Lines changed: 24 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ msg_debug() {
6363
local _msg_opts="-a build.sh"
6464
[[ "${msgdebug}" = true ]] && _msg_opts="${_msg_opts} -x"
6565
[[ "${nocolor}" = true ]] && _msg_opts="${_msg_opts} -n"
66-
"${script_path}/tools/msg.sh" ${_msg_opts} info "${@}"
66+
"${script_path}/tools/msg.sh" ${_msg_opts} debug "${@}"
6767
fi
6868
}
6969

@@ -159,11 +159,11 @@ _usage () {
159159
echo -ne " ${_channel}"
160160
for _b in $( seq 1 $(( ${blank} - 4 - ${#_channel} )) ); do echo -ne " "; done
161161
if [[ ! "$(cat "${script_path}/channels/${_dirname}/alteriso" 2> /dev/null)" = "alteriso=${alteriso_version}" ]] && [[ "${nochkver}" = false ]]; then
162-
echo -ne "$( echo_color -t '31' 'ERROR:') Not compatible with AlterISO3\n"
162+
"${script_path}/tools/msg.sh" --noadjust -l 'ERROR:' --noappname error "Not compatible with AlterISO3"
163163
elif [[ -f "${script_path}/channels/${_dirname}/description.txt" ]]; then
164164
echo -ne "$(cat "${script_path}/channels/${_dirname}/description.txt")\n"
165165
else
166-
echo -ne "$( echo_color -t '33' 'WARN :') This channel does not have a description.txt.\n"
166+
"${script_path}/tools/msg.sh" --noadjust -l 'WARN :' --noappname warn "This channel does not have a description.txt"
167167
fi
168168
done
169169

@@ -258,11 +258,6 @@ load_config() {
258258
done
259259
}
260260

261-
# 作業ディレクトリを削除
262-
remove_work() {
263-
remove "${work_dir}"
264-
}
265-
266261
# Display channel list
267262
show_channel_list() {
268263
if [[ "${nochkver}" = true ]]; then
@@ -387,7 +382,7 @@ prepare_env() {
387382
_trap_remove_work() {
388383
local status=${?}
389384
echo
390-
remove "${work_dir}"
385+
"${script_path}/tools/clean.sh" -o -w $(realpath "${work_dir}") $([[ "${debug}" = true ]] && echo -n "-d")
391386
exit ${status}
392387
}
393388
trap '_trap_remove_work' 1 2 3 15
@@ -503,12 +498,7 @@ prepare_build() {
503498
check_bool customized_syslinux
504499

505500
# Unmount
506-
local _mount
507-
for _mount in $(mount | getclm 3 | grep $(realpath ${work_dir})); do
508-
msg_info "Unmounting ${_mount}"
509-
umount "${_mount}"
510-
done
511-
unset _mount
501+
umount_chroot
512502

513503
# Pacman configuration file used only when building
514504
build_pacman_conf="${script_path}/system/pacman-${arch}.conf"
@@ -1377,39 +1367,31 @@ msg_debug "Use the default configuration file (${defaultconfig})."
13771367
set +eu
13781368

13791369
# Check for a valid channel name
1380-
case "$(bash "${script_path}/tools/channel.sh" -m check "${1}")" in
1381-
"incorrect")
1382-
msg_error "Invalid channel ${1}" "1"
1383-
;;
1384-
"directory")
1385-
channel_dir="${1}"
1386-
channel_name="$(basename "${1%/}")"
1387-
;;
1388-
"correct")
1389-
channel_dir="${script_path}/channels/${1}"
1390-
channel_name="${1}"
1391-
;;
1392-
esac
1370+
if [[ -n "${1}" ]]; then
1371+
case "$(bash "${script_path}/tools/channel.sh" -n -m check "${1}")" in
1372+
"incorrect")
1373+
msg_error "Invalid channel ${1}" "1"
1374+
;;
1375+
"directory")
1376+
channel_dir="${1}"
1377+
channel_name="$(basename "${1%/}")"
1378+
;;
1379+
"correct")
1380+
channel_dir="${script_path}/channels/${1}"
1381+
channel_name="${1}"
1382+
;;
1383+
esac
1384+
fi
13931385

13941386
# Set for special channels
13951387
if [[ -d "${channel_dir}.add" ]]; then
13961388
channel_name="${1}"
13971389
channel_dir="${channel_dir}.add"
1398-
elif [[ "${channel_name}" = "rebuild" ]]; then
1399-
if [[ -f "${rebuildfile}" ]]; then
1400-
rebuild=true
1401-
else
1402-
msg_error "The previous build information is not in the working directory." "1"
1403-
fi
14041390
elif [[ "${channel_name}" = "clean" ]]; then
1405-
umount_chroot
1406-
remove "${script_path}/menuconfig/build"
1407-
remove "${script_path}/system/cpp-src/mkalteriso/build"
1408-
remove "${script_path}/menuconfig-script/kernel_choice"
1409-
remove "${work_dir%/}"/*
1410-
remove "${work_dir}"
1411-
remove "${rebuildfile}"
1391+
"${script_path}/tools/clean.sh" -w $(realpath "${work_dir}") $([[ "${debug}" = true ]] && echo -n "-d")
14121392
exit 0
1393+
else
1394+
channel_dir="${script_path}/channels/${channel_name}"
14131395
fi
14141396

14151397
# Check channel version
@@ -1460,6 +1442,5 @@ if [[ "${tarball}" = true ]]; then
14601442
done
14611443
fi
14621444
[[ "${noiso}" = false ]] && run_once make_iso
1463-
[[ "${cleaning}" = true ]] && remove_work
1464-
1445+
[[ "${cleaning}" = true ]] && "${script_path}/tools/clean.sh" -o -w $(realpath "${work_dir}") $([[ "${debug}" = true ]] && echo -n "-d")
14651446
exit 0

build.sh

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,40 @@ umask 0022
4242
# $1: message string
4343
msg_info() {
4444
local _msg_opts="-a build.sh"
45+
if [[ "${1}" = "-n" ]]; then
46+
_msg_opts="${_msg_opts} -o -n"
47+
shift 1
48+
fi
4549
[[ "${msgdebug}" = true ]] && _msg_opts="${_msg_opts} -x"
4650
[[ "${nocolor}" = true ]] && _msg_opts="${_msg_opts} -n"
47-
"${script_path}/tools/msg.sh" ${_msg_opts} info "${@}"
51+
"${script_path}/tools/msg.sh" ${_msg_opts} info "${1}"
4852
}
4953

5054
# Show an Warning message
5155
# $1: message string
5256
msg_warn() {
5357
local _msg_opts="-a build.sh"
58+
if [[ "${1}" = "-n" ]]; then
59+
_msg_opts="${_msg_opts} -o -n"
60+
shift 1
61+
fi
5462
[[ "${msgdebug}" = true ]] && _msg_opts="${_msg_opts} -x"
5563
[[ "${nocolor}" = true ]] && _msg_opts="${_msg_opts} -n"
56-
"${script_path}/tools/msg.sh" ${_msg_opts} warn "${@}"
64+
"${script_path}/tools/msg.sh" ${_msg_opts} warn "${1}"
5765
}
5866

5967
# Show an debug message
6068
# $1: message string
6169
msg_debug() {
6270
if [[ "${debug}" = true ]]; then
6371
local _msg_opts="-a build.sh"
72+
if [[ "${1}" = "-n" ]]; then
73+
_msg_opts="${_msg_opts} -o -n"
74+
shift 1
75+
fi
6476
[[ "${msgdebug}" = true ]] && _msg_opts="${_msg_opts} -x"
6577
[[ "${nocolor}" = true ]] && _msg_opts="${_msg_opts} -n"
66-
"${script_path}/tools/msg.sh" ${_msg_opts} info "${@}"
78+
"${script_path}/tools/msg.sh" ${_msg_opts} debug "${1}"
6779
fi
6880
}
6981

@@ -72,6 +84,10 @@ msg_debug() {
7284
# $2: exit code number (with 0 does not exit)
7385
msg_error() {
7486
local _msg_opts="-a build.sh"
87+
if [[ "${1}" = "-n" ]]; then
88+
_msg_opts="${_msg_opts} -o -n"
89+
shift 1
90+
fi
7591
[[ "${msgdebug}" = true ]] && _msg_opts="${_msg_opts} -x"
7692
[[ "${nocolor}" = true ]] && _msg_opts="${_msg_opts} -n"
7793
"${script_path}/tools/msg.sh" ${_msg_opts} error "${1}"
@@ -158,11 +174,11 @@ _usage () {
158174
echo -ne " ${_channel}"
159175
for _b in $( seq 1 $(( ${blank} - 4 - ${#_channel} )) ); do echo -ne " "; done
160176
if [[ ! "$(cat "${script_path}/channels/${_dirname}/alteriso" 2> /dev/null)" = "alteriso=${alteriso_version}" ]] && [[ "${nochkver}" = false ]]; then
161-
echo -ne "$( echo_color -t '31' 'ERROR:') Not compatible with AlterISO3\n"
177+
"${script_path}/tools/msg.sh" --noadjust -l 'ERROR:' --noappname error "Not compatible with AlterISO3"
162178
elif [[ -f "${script_path}/channels/${_dirname}/description.txt" ]]; then
163179
echo -ne "$(cat "${script_path}/channels/${_dirname}/description.txt")\n"
164180
else
165-
echo -ne "$( echo_color -t '33' 'WARN :') This channel does not have a description.txt.\n"
181+
"${script_path}/tools/msg.sh" --noadjust -l 'WARN :' --noappname warn "This channel does not have a description.txt"
166182
fi
167183
done
168184
echo -ne " rebuild"
@@ -248,11 +264,6 @@ load_config() {
248264
done
249265
}
250266

251-
# 作業ディレクトリを削除
252-
remove_work() {
253-
remove "${work_dir}"
254-
}
255-
256267
# Display channel list
257268
show_channel_list() {
258269
if [[ "${nochkver}" = true ]]; then
@@ -363,7 +374,7 @@ prepare_env() {
363374
_trap_remove_work() {
364375
local status=${?}
365376
echo
366-
remove "${work_dir}"
377+
"${script_path}/tools/clean.sh" -o -w $(realpath "${work_dir}") $([[ "${debug}" = true ]] && echo -n "-d")
367378
exit ${status}
368379
}
369380
trap '_trap_remove_work' 1 2 3 15
@@ -592,12 +603,7 @@ prepare_build() {
592603
fi
593604

594605
# Unmount
595-
local _mount
596-
for _mount in $(mount | getclm 3 | grep $(realpath ${work_dir})); do
597-
msg_info "Unmounting ${_mount}"
598-
umount "${_mount}"
599-
done
600-
unset _mount
606+
umount_chroot
601607
}
602608

603609

@@ -1443,19 +1449,21 @@ rebuildfile="${work_dir}/alteriso_config"
14431449
set +eu
14441450

14451451
# Check for a valid channel name
1446-
case "$(bash "${script_path}/tools/channel.sh" check "${1}")" in
1447-
"incorrect")
1448-
msg_error "Invalid channel ${1}" "1"
1449-
;;
1450-
"directory")
1451-
channel_dir="${1}"
1452-
channel_name="$(basename "${1%/}")"
1453-
;;
1454-
"correct")
1455-
channel_dir="${script_path}/channels/${1}"
1456-
channel_name="${1}"
1457-
;;
1458-
esac
1452+
if [[ -n "${1}" ]]; then
1453+
case "$(bash "${script_path}/tools/channel.sh" -n -m check "${1}")" in
1454+
"incorrect")
1455+
msg_error "Invalid channel ${1}" "1"
1456+
;;
1457+
"directory")
1458+
channel_dir="${1}"
1459+
channel_name="$(basename "${1%/}")"
1460+
;;
1461+
"correct")
1462+
channel_dir="${script_path}/channels/${1}"
1463+
channel_name="${1}"
1464+
;;
1465+
esac
1466+
fi
14591467

14601468
# Set for special channels
14611469
if [[ -d "${channel_dir}.add" ]]; then
@@ -1468,14 +1476,10 @@ elif [[ "${channel_name}" = "rebuild" ]]; then
14681476
msg_error "The previous build information is not in the working directory." "1"
14691477
fi
14701478
elif [[ "${channel_name}" = "clean" ]]; then
1471-
umount_chroot
1472-
remove "${script_path}/menuconfig/build"
1473-
remove "${script_path}/system/cpp-src/mkalteriso/build"
1474-
remove "${script_path}/menuconfig-script/kernel_choice"
1475-
remove "${work_dir%/}"/*
1476-
remove "${work_dir}"
1477-
remove "${rebuildfile}"
1479+
"${script_path}/tools/clean.sh" -w $(realpath "${work_dir}") $([[ "${debug}" = true ]] && echo -n "-d")
14781480
exit 0
1481+
else
1482+
channel_dir="${script_path}/channels/${channel_name}"
14791483
fi
14801484

14811485
# Check channel version
@@ -1517,6 +1521,6 @@ run_once make_efiboot
15171521
[[ "${tarball}" = true ]] && run_once make_tarball
15181522

15191523
[[ "${noiso}" = false ]] && run_once make_iso
1520-
[[ "${cleaning}" = true ]] && remove_work
1524+
[[ "${cleaning}" = true ]] && "${script_path}/tools/clean.sh" -o -w $(realpath "${work_dir}") $([[ "${debug}" = true ]] && echo -n "-d")
15211525

15221526
exit 0

channels/cinnamon/packages.i686/lang/ja.i686

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ firefox-i18n-ja
2525

2626
# LibreOffice
2727
libreoffice-still-ja
28+
29+
# other
30+
man-pages-ja

channels/cinnamon/packages.x86_64/lang/ja.x86_64

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ fcitx-qt5
2323

2424
# other
2525
libreoffice-still-ja
26+
man-pages-ja

channels/deepin/packages.x86_64/lang/ja.x86_64

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ fcitx-qt5
2323

2424
# other
2525
libreoffice-still-ja
26+
man-pages-ja

channels/gnome-mac/packages.x86_64/lang/ja.x86_64

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ fcitx-qt5
2323

2424
# other
2525
libreoffice-still-ja
26+
man-pages-ja

channels/gnome/packages.x86_64/lang/ja.x86_64

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ fcitx-qt5
2323

2424
# other
2525
libreoffice-still-ja
26+
27+
# other
28+
man-pages-ja

channels/i3/airootfs.any/etc/skel/.config/polybar/blocks/blocks_none.ini

100644100755
File mode changed.

channels/i3/airootfs.any/etc/skel/.config/polybar/blocks/blocks_round.ini

100644100755
File mode changed.

channels/i3/airootfs.any/etc/skel/.config/polybar/blocks/blocks_sharp.ini

100644100755
File mode changed.

0 commit comments

Comments
 (0)