OSDN Git Service

[update] : Added --add-module
authorhayao <hayao@fascode.net>
Fri, 13 Aug 2021 09:14:48 +0000 (18:14 +0900)
committerhayao <hayao@fascode.net>
Fri, 13 Aug 2021 09:14:48 +0000 (18:14 +0900)
build.sh
default.conf

index e8f28d2..112aad8 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -151,6 +151,7 @@ _usage () {
     echo "         --nopkgbuild            Ignore PKGBUILD (Use only for debugging)"
     echo "         --tar-type <comp_type>  Set compression type (gzip, lzma, lzo, xz, zstd)"
     echo "         --tar-opts <option>     Set tar command argument (Use with --tarball)"
+    echo "         --add-module <module>   Load additional modules (Separated by \",\")"
     echo
     echo " Many packages are installed from AUR, so specifying --noaur can cause problems."
     echo
@@ -407,6 +408,9 @@ prepare_build() {
     # Load configs
     load_config "${channel_dir}/config.any" "${channel_dir}/config.${arch}"
 
+    # Additional modules
+    modules+=("${additional_modules[@]}")
+
     # Legacy mode
     if [[ "$(bash "${tools_dir}/channel.sh" --version "${alteriso_version}" ver "${channel_name}")" = "3.0" ]]; then
         msg_warn "The module cannot be used because it works with Alter ISO3.0 compatibility."
@@ -1056,7 +1060,7 @@ make_iso() {
 # Parse options
 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:")
+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:")
 OPT="$(getopt -o "$(printf "%s," "${OPTS[@]}")" -l "$(printf "%s," "${OPTL[@]}")" --  "${ARGUMENT[@]}")" || exit 1
 
 eval set -- "${OPT}"
@@ -1244,6 +1248,11 @@ while true; do
             IFS=" " read -r -a tar_comp_opt <<< "${2}"
             shift 2
             ;;
+        --add-module)
+            readarray -t -O "${#additional_modules[@]}" additional_modules < <(echo "${2}" | tr "," "\n")
+            msg_debug "Added modules: ${additional_modules[*]}"
+            shift 2
+            ;;
         --)
             shift
             break
index 619c932..2fbf508 100644 (file)
@@ -285,6 +285,11 @@ gitversion=false
 # This setting cannot be changed by an argument.
 additional_exclude_pkg=()
 
+# Additional list of modules to load
+# Use this array for debugging only
+# This setting cannot be changed by an argument.
+additional_modules=()
+
 # Run with tee command
 # Set to "false" to disable logging
 # If not false, the log will be saved in the specified path.