Skip to content

Commit a284d64

Browse files
committed
[update] : Added --add-module
1 parent 2d51b0a commit a284d64

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

build.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ _usage () {
151151
echo " --nopkgbuild Ignore PKGBUILD (Use only for debugging)"
152152
echo " --tar-type <comp_type> Set compression type (gzip, lzma, lzo, xz, zstd)"
153153
echo " --tar-opts <option> Set tar command argument (Use with --tarball)"
154+
echo " --add-module <module> Load additional modules (Separated by \",\")"
154155
echo
155156
echo " Many packages are installed from AUR, so specifying --noaur can cause problems."
156157
echo
@@ -407,6 +408,9 @@ prepare_build() {
407408
# Load configs
408409
load_config "${channel_dir}/config.any" "${channel_dir}/config.${arch}"
409410

411+
# Additional modules
412+
modules+=("${additional_modules[@]}")
413+
410414
# Legacy mode
411415
if [[ "$(bash "${tools_dir}/channel.sh" --version "${alteriso_version}" ver "${channel_name}")" = "3.0" ]]; then
412416
msg_warn "The module cannot be used because it works with Alter ISO3.0 compatibility."
@@ -1056,7 +1060,7 @@ make_iso() {
10561060
# Parse options
10571061
ARGUMENT=("${DEFAULT_ARGUMENT[@]}" "${@}")
10581062
OPTS=("a:" "b" "c:" "d" "e" "g:" "h" "j" "k:" "l:" "o:" "p:" "r" "t:" "u:" "w:" "x")
1059-
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:")
1063+
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:")
10601064
OPT="$(getopt -o "$(printf "%s," "${OPTS[@]}")" -l "$(printf "%s," "${OPTL[@]}")" -- "${ARGUMENT[@]}")" || exit 1
10611065

10621066
eval set -- "${OPT}"
@@ -1244,6 +1248,11 @@ while true; do
12441248
IFS=" " read -r -a tar_comp_opt <<< "${2}"
12451249
shift 2
12461250
;;
1251+
--add-module)
1252+
readarray -t -O "${#additional_modules[@]}" additional_modules < <(echo "${2}" | tr "," "\n")
1253+
msg_debug "Added modules: ${additional_modules[*]}"
1254+
shift 2
1255+
;;
12471256
--)
12481257
shift
12491258
break

default.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,11 @@ gitversion=false
285285
# This setting cannot be changed by an argument.
286286
additional_exclude_pkg=()
287287

288+
# Additional list of modules to load
289+
# Use this array for debugging only
290+
# This setting cannot be changed by an argument.
291+
additional_modules=()
292+
288293
# Run with tee command
289294
# Set to "false" to disable logging
290295
# If not false, the log will be saved in the specified path.

0 commit comments

Comments
 (0)