Skip to content

Commit 87f4a7f

Browse files
committed
[update] : Added --cowspace
1 parent 748511b commit 87f4a7f

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,7 @@ make_setup_mkinitcpio() {
708708
cp "${script_path}/system/initcpio/install/${_hook}" "${airootfs_dir}/etc/initcpio/install"
709709
done
710710

711+
sed -i "s|%COWSPACE%|${cowspace}|g" "${airootfs_dir}/etc/initcpio/hooks/archiso"
711712
sed -i "s|/usr/lib/initcpio/|/etc/initcpio/|g" "${airootfs_dir}/etc/initcpio/install/archiso_shutdown"
712713
cp "${script_path}/system/initcpio/install/archiso_kms" "${airootfs_dir}/etc/initcpio/install"
713714
cp "${script_path}/system/initcpio/archiso_shutdown" "${airootfs_dir}/etc/initcpio"
@@ -1052,7 +1053,7 @@ make_iso() {
10521053

10531054

10541055
# Parse options
1055-
ARGUMENT=("${DEFAULT_ARGUMENT[@]}" "${@}") OPTS=("a:" "b" "c:" "d" "e" "g:" "h" "j" "k:" "l:" "o:" "p:" "r" "t:" "u:" "w:" "x") OPTL=("arch:" "boot-splash" "comp-type:" "debug" "cleaning" "cleanup" "gpgkey:" "help" "lang:" "japanese" "kernel:" "out:" "password:" "comp-opts:" "user:" "work:" "bash-debug" "nocolor" "noconfirm" "nodepend" "gitversion" "msgdebug" "noloopmod" "tarball" "noiso" "noaur" "nochkver" "channellist" "config:" "noefi" "nodebug" "nosigcheck" "normwork" "log" "logpath:" "nolog" "nopkgbuild" "pacman-debug" "confirm" "tar-type:" "tar-opts:" "add-module:" "nogitversion")
1056+
ARGUMENT=("${DEFAULT_ARGUMENT[@]}" "${@}") OPTS=("a:" "b" "c:" "d" "e" "g:" "h" "j" "k:" "l:" "o:" "p:" "r" "t:" "u:" "w:" "x") OPTL=("arch:" "boot-splash" "comp-type:" "debug" "cleaning" "cleanup" "gpgkey:" "help" "lang:" "japanese" "kernel:" "out:" "password:" "comp-opts:" "user:" "work:" "bash-debug" "nocolor" "noconfirm" "nodepend" "gitversion" "msgdebug" "noloopmod" "tarball" "noiso" "noaur" "nochkver" "channellist" "config:" "noefi" "nodebug" "nosigcheck" "normwork" "log" "logpath:" "nolog" "nopkgbuild" "pacman-debug" "confirm" "tar-type:" "tar-opts:" "add-module:" "nogitversion" "cowspace:")
10561057
GETOPT=(-o "$(printf "%s," "${OPTS[@]}")" -l "$(printf "%s," "${OPTL[@]}")" -- "${ARGUMENT[@]}")
10571058
getopt -Q "${GETOPT[@]}" || exit 1 # 引数エラー判定
10581059
readarray -t OPT < <(getopt "${GETOPT[@]}") # 配列に代入
@@ -1154,6 +1155,7 @@ while true; do
11541155
--nolog ) logging=false && shift 1 ;;
11551156
--nopkgbuild ) nopkgbuild=true && shift 1 ;;
11561157
--nogitversion ) gitversion=false && shift 1 ;;
1158+
--cowspace ) cowspace="${2}" && shift 2 ;;
11571159
-- ) shift 1 && break ;;
11581160
*)
11591161
msg_error "Argument exception error '${1}'"

default.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ usershell="/bin/bash"
172172
# Install memtest86
173173
memtest86=true
174174

175+
# Set the size of cowspace
176+
# Change the default behavior of "--cowspace"
177+
cowspace="1GB"
175178

176179
#-- language config --#
177180

system/initcpio/hooks/archiso

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ run_hook() {
136136
# defined via initcpio's parse_cmdline()
137137
[ -z "${archisodevice}" ] && archisodevice="/dev/disk/by-label/${archisolabel}"
138138
#[ -z "${cow_spacesize}" ] && cow_spacesize="256M"
139-
[ -z "${cow_spacesize}" ] && cow_spacesize="1G"
139+
[ -z "${cow_spacesize}" ] && cow_spacesize="%COWSPACE%"
140140
# shellcheck disable=SC2154
141141
# defined via initcpio's parse_cmdline()
142142
if [ -n "${cow_label}" ]; then

0 commit comments

Comments
 (0)