Skip to content

Commit 7cdf7bc

Browse files
committed
Merge branch 'script-no-header' into dev
2 parents 2c824d5 + a6823de commit 7cdf7bc

File tree

11 files changed

+24
-587
lines changed

11 files changed

+24
-587
lines changed

build.sh

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ make_pkgbuild() {
751751
# Customize installation (airootfs)
752752
make_customize_airootfs() {
753753
# Overwrite airootfs with customize_airootfs.
754-
local _airootfs _airootfs_script_options _script _script_list _airootfs_list
754+
local _airootfs _airootfs_script_options _script _script_list _airootfs_list _main_script
755755

756756
_airootfs_list=(
757757
"${share_dir}/airootfs.any"
@@ -808,28 +808,30 @@ make_customize_airootfs() {
808808
[[ "${rebuild}" = true ]] && _airootfs_script_options="${_airootfs_script_options} -r"
809809

810810

811+
_main_script="root/customize_airootfs.sh"
812+
811813
_script_list=(
812-
"/root/customize_airootfs.sh"
813-
"/root/customize_airootfs.sh"
814-
"/root/customize_airootfs_${channel_name}.sh"
815-
"/root/customize_airootfs_${channel_name%.add}.sh"
814+
"${airootfs_dir}/root/customize_airootfs_${channel_name}.sh"
815+
"${airootfs_dir}/root/customize_airootfs_${channel_name%.add}.sh"
816816
)
817817

818818
if [[ "${include_extra}" = true ]]; then
819-
_script_list+=(
820-
"/root/customize_airootfs_share-extra.sh"
821-
)
819+
_script_list=(${_script_list[@]} "${airootfs_dir}/root/customize_airootfs_share-extra.sh")
822820
fi
823821

824-
# Script permission
822+
# Create script
825823
for _script in ${_script_list[@]}; do
826-
if [[ -f "${airootfs_dir}/${_script}" ]]; then
827-
chmod 755 "${airootfs_dir}/${_script}"
828-
${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" -r "${_script} ${_airootfs_script_options}" run
829-
remove "${airootfs_dir}/${_script}"
824+
if [[ -f "${_script}" ]]; then
825+
echo -e "\n" >> "${airootfs_dir}/${_main_script}"
826+
cat "${_script}" >> "${airootfs_dir}/${_main_script}"
827+
remove "${_script}"
830828
fi
831829
done
832830

831+
chmod 755 "${airootfs_dir}/${_main_script}"
832+
${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" -r "${_main_script} ${_airootfs_script_options}" run
833+
remove "${airootfs_dir}/${_main_script}"
834+
833835
# /root permission https://github.com/archlinux/archiso/commit/d39e2ba41bf556674501062742190c29ee11cd59
834836
chmod -f 750 "${airootfs_dir}/root"
835837
}
@@ -1121,6 +1123,7 @@ make_prepare() {
11211123
fi
11221124
${mkalteriso} ${mkalteriso_option} -w "${work_dir}" -D "${install_dir}" pkglist
11231125
pacman -Q --sysroot "${work_dir}/airootfs" > "${work_dir}/packages-full.list"
1126+
remove "${work_dir}/airootfs/root/optimize_for_tarball.sh"
11241127
${mkalteriso} ${mkalteriso_option} -w "${work_dir}" -D "${install_dir}" ${gpg_key:+-g ${gpg_key}} -c "${sfs_comp}" -t "${sfs_comp_opt}" prepare
11251128

11261129
if [[ "${cleaning}" = true ]]; then

channels/basic/airootfs.any/root/customize_airootfs_basic.sh

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -7,69 +7,5 @@
77
# (c) 2019-2021 Fascode Network.
88
#
99

10-
set -e -u
11-
12-
13-
# Default value
14-
# All values can be changed by arguments.
15-
password=alter
16-
boot_splash=false
17-
kernel_config_line=("zen" "vmlinuz-linux-zen" "linux-zen")
18-
theme_name=alter-logo
19-
rebuild=false
20-
username='alter'
21-
os_name="Alter Linux"
22-
install_dir="alter"
23-
usershell="/bin/bash"
24-
debug=false
25-
timezone="UTC"
26-
localegen="en_US\\.UTF-8\\"
27-
language="en"
28-
29-
30-
# Parse arguments
31-
while getopts 'p:bt:k:rxu:o:i:s:da:g:z:l:' arg; do
32-
case "${arg}" in
33-
p) password="${OPTARG}" ;;
34-
b) boot_splash=true ;;
35-
t) theme_name="${OPTARG}" ;;
36-
k) kernel_config_line=(${OPTARG}) ;;
37-
r) rebuild=true ;;
38-
u) username="${OPTARG}" ;;
39-
o) os_name="${OPTARG}" ;;
40-
i) install_dir="${OPTARG}" ;;
41-
s) usershell="${OPTARG}" ;;
42-
d) debug=true ;;
43-
x) debug=true; set -xv ;;
44-
a) arch="${OPTARG}" ;;
45-
g) localegen="${OPTARG/./\\.}\\" ;;
46-
z) timezone="${OPTARG}" ;;
47-
l) language="${OPTARG}" ;;
48-
esac
49-
done
50-
51-
52-
# Parse kernel
53-
kernel="${kernel_config_line[0]}"
54-
kernel_filename="${kernel_config_line[1]}"
55-
kernel_mkinitcpio_profile="${kernel_config_line[2]}"
56-
57-
# Delete file only if file exists
58-
# remove <file1> <file2> ...
59-
function remove () {
60-
local _list
61-
local _file
62-
_list=($(echo "$@"))
63-
for _file in "${_list[@]}"; do
64-
if [[ -f ${_file} ]]; then
65-
rm -f "${_file}"
66-
elif [[ -d ${_file} ]]; then
67-
rm -rf "${_file}"
68-
fi
69-
echo "${_file} was deleted."
70-
done
71-
}
72-
7310
# Update system datebase
7411
#dconf update
75-

channels/cinnamon/airootfs.any/root/customize_airootfs_cinnamon.sh

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -7,53 +7,6 @@
77
# (c) 2019-2021 Fascode Network.
88
#
99

10-
set -e -u
11-
12-
13-
# Default value
14-
# All values can be changed by arguments.
15-
password=alter
16-
boot_splash=false
17-
kernel_config_line=("zen" "vmlinuz-linux-zen" "linux-zen")
18-
theme_name=alter-logo
19-
rebuild=false
20-
username='alter'
21-
os_name="Alter Linux"
22-
install_dir="alter"
23-
usershell="/bin/bash"
24-
debug=false
25-
timezone="UTC"
26-
localegen="en_US\\.UTF-8\\"
27-
language="en"
28-
29-
30-
# Parse arguments
31-
while getopts 'p:bt:k:rxu:o:i:s:da:g:z:l:' arg; do
32-
case "${arg}" in
33-
p) password="${OPTARG}" ;;
34-
b) boot_splash=true ;;
35-
t) theme_name="${OPTARG}" ;;
36-
k) kernel_config_line=(${OPTARG}) ;;
37-
r) rebuild=true ;;
38-
u) username="${OPTARG}" ;;
39-
o) os_name="${OPTARG}" ;;
40-
i) install_dir="${OPTARG}" ;;
41-
s) usershell="${OPTARG}" ;;
42-
d) debug=true ;;
43-
x) debug=true; set -xv ;;
44-
a) arch="${OPTARG}" ;;
45-
g) localegen="${OPTARG/./\\.}\\" ;;
46-
z) timezone="${OPTARG}" ;;
47-
l) language="${OPTARG}" ;;
48-
esac
49-
done
50-
51-
52-
# Parse kernel
53-
kernel="${kernel_config_line[0]}"
54-
kernel_filename="${kernel_config_line[1]}"
55-
kernel_mkinitcpio_profile="${kernel_config_line[2]}"
56-
5710
# Enable LightDM to auto login
5811
if [[ "${boot_splash}" = true ]]; then
5912
systemctl enable lightdm-plymouth.service
@@ -69,4 +22,3 @@ sed -i s/%PASSWORD%/${password}/g "/etc/dconf/db/local.d/02-disable-lock"
6922

7023
# Update system datebase
7124
dconf update
72-

channels/gnome-mac/airootfs.any/root/customize_airootfs_gnome-mac.sh

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -7,71 +7,6 @@
77
# (c) 2019-2021 Fascode Network.
88
#
99

10-
set -e -u
11-
12-
13-
# Default value
14-
# All values can be changed by arguments.
15-
password=alter
16-
boot_splash=false
17-
kernel_config_line=("zen" "vmlinuz-linux-zen" "linux-zen")
18-
theme_name=alter-logo
19-
rebuild=false
20-
username='alter'
21-
os_name="Alter Linux"
22-
install_dir="alter"
23-
usershell="/bin/bash"
24-
debug=false
25-
timezone="UTC"
26-
localegen="en_US\\.UTF-8\\"
27-
language="en"
28-
29-
30-
# Parse arguments
31-
while getopts 'p:bt:k:rxu:o:i:s:da:g:z:l:' arg; do
32-
case "${arg}" in
33-
p) password="${OPTARG}" ;;
34-
b) boot_splash=true ;;
35-
t) theme_name="${OPTARG}" ;;
36-
k) kernel_config_line=(${OPTARG}) ;;
37-
r) rebuild=true ;;
38-
u) username="${OPTARG}" ;;
39-
o) os_name="${OPTARG}" ;;
40-
i) install_dir="${OPTARG}" ;;
41-
s) usershell="${OPTARG}" ;;
42-
d) debug=true ;;
43-
x) debug=true; set -xv ;;
44-
a) arch="${OPTARG}" ;;
45-
g) localegen="${OPTARG/./\\.}\\" ;;
46-
z) timezone="${OPTARG}" ;;
47-
l) language="${OPTARG}" ;;
48-
esac
49-
done
50-
51-
52-
# Parse kernel
53-
kernel="${kernel_config_line[0]}"
54-
kernel_filename="${kernel_config_line[1]}"
55-
kernel_mkinitcpio_profile="${kernel_config_line[2]}"
56-
57-
58-
# Delete file only if file exists
59-
# remove <file1> <file2> ...
60-
function remove () {
61-
local _list
62-
local _file
63-
_list=($(echo "$@"))
64-
for _file in "${_list[@]}"; do
65-
if [[ -f ${_file} ]]; then
66-
rm -f "${_file}"
67-
elif [[ -d ${_file} ]]; then
68-
rm -rf "${_file}"
69-
fi
70-
echo "${_file} was deleted."
71-
done
72-
}
73-
74-
7510
# Enable gdm to auto login
7611
if [[ "${boot_splash}" = true ]]; then
7712
systemctl enable gdm-plymouth.service

channels/gnome/airootfs.any/root/customize_airootfs_gnome.sh

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -7,71 +7,6 @@
77
# (c) 2019-2021 Fascode Network.
88
#
99

10-
set -e -u
11-
12-
13-
# Default value
14-
# All values can be changed by arguments.
15-
password=alter
16-
boot_splash=false
17-
kernel_config_line=("zen" "vmlinuz-linux-zen" "linux-zen")
18-
theme_name=alter-logo
19-
rebuild=false
20-
username='alter'
21-
os_name="Alter Linux"
22-
install_dir="alter"
23-
usershell="/bin/bash"
24-
debug=false
25-
timezone="UTC"
26-
localegen="en_US\\.UTF-8\\"
27-
language="en"
28-
29-
30-
# Parse arguments
31-
while getopts 'p:bt:k:rxu:o:i:s:da:g:z:l:' arg; do
32-
case "${arg}" in
33-
p) password="${OPTARG}" ;;
34-
b) boot_splash=true ;;
35-
t) theme_name="${OPTARG}" ;;
36-
k) kernel_config_line=(${OPTARG}) ;;
37-
r) rebuild=true ;;
38-
u) username="${OPTARG}" ;;
39-
o) os_name="${OPTARG}" ;;
40-
i) install_dir="${OPTARG}" ;;
41-
s) usershell="${OPTARG}" ;;
42-
d) debug=true ;;
43-
x) debug=true; set -xv ;;
44-
a) arch="${OPTARG}" ;;
45-
g) localegen="${OPTARG/./\\.}\\" ;;
46-
z) timezone="${OPTARG}" ;;
47-
l) language="${OPTARG}" ;;
48-
esac
49-
done
50-
51-
52-
# Parse kernel
53-
kernel="${kernel_config_line[0]}"
54-
kernel_filename="${kernel_config_line[1]}"
55-
kernel_mkinitcpio_profile="${kernel_config_line[2]}"
56-
57-
58-
# Delete file only if file exists
59-
# remove <file1> <file2> ...
60-
function remove () {
61-
local _list
62-
local _file
63-
_list=($(echo "$@"))
64-
for _file in "${_list[@]}"; do
65-
if [[ -f ${_file} ]]; then
66-
rm -f "${_file}"
67-
elif [[ -d ${_file} ]]; then
68-
rm -rf "${_file}"
69-
fi
70-
echo "${_file} was deleted."
71-
done
72-
}
73-
74-
7510
# Enable gdm to auto login
7611
if [[ "${boot_splash}" = true ]]; then
7712
systemctl enable gdm-plymouth.service

0 commit comments

Comments
 (0)