Skip to content

Commit ea7666a

Browse files
committed
[update] : Include module list in alteriso-info
1 parent c871334 commit ea7666a

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

tools/alteriso-info.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22
script_path="$( cd -P "$( dirname "$(readlink -f "$0")" )" && cd .. && pwd )"
33
tools_dir="${script_path}/tools"
4+
modules=()
45

56
_help() {
67
echo "usage ${0} [options]"
@@ -12,7 +13,8 @@ _help() {
1213
echo " -b | --boot-splash [bool] Set plymouth status (true or false)"
1314
echo " -c | --channel [str] Specify the channel"
1415
echo " -d | --developer [str] Specify the developer"
15-
echo " -k | --kernel [srt] Specify the kernel name"
16+
echo " -k | --kernel [str] Specify the kernel name"
17+
echo " -m | --module [str] Specity the module (Separated by \",\")"
1618
echo " -o | --os-name [str] Specify the application name"
1719
echo " -p | --password [str] Specify the user password for livecd"
1820
echo " -u | --username [str] Specify the user name for livecd"
@@ -21,8 +23,8 @@ _help() {
2123
}
2224

2325
# Parse options
24-
OPTS="a:b:c:d:k:o:p:u:v:h"
25-
OPTL="arch:,boot-splash:,channel:,developer:,kernel:,os-name:,password:,username:,version:,help"
26+
OPTS="a:b:c:d:k:m:o:p:u:v:h"
27+
OPTL="arch:,boot-splash:,channel:,developer:,kernel:,module:,os-name:,password:,username:,version:,help"
2628
if ! OPT="$(getopt -o "${OPTS}" -l "${OPTL}" -- "${@}")"; then
2729
exit 1
2830
fi
@@ -57,6 +59,10 @@ while true; do
5759
kernel="${2}"
5860
shift 2
5961
;;
62+
-m | --module)
63+
readarray -t -O "${#modules[@]}" modules < <(echo "${2}" | tr "," "\n")
64+
shift 2
65+
;;
6066
-o | --os-name)
6167
iso_application="${2}"
6268
shift 2
@@ -85,6 +91,7 @@ while true; do
8591
esac
8692
done
8793

94+
# Check values
8895
variable_list=( "arch" "boot_splash" "channel_name" "iso_publisher" "kernel" "iso_application" "password" "username" "iso_version")
8996

9097
error=false
@@ -109,6 +116,7 @@ echo "Live user name : ${username}"
109116
echo "Live user pass : ${password}"
110117
echo "Kernel name : ${kernel}"
111118
echo "Kernel path : ${kernel_filename}"
119+
[[ "${#modules[@]}" != 0 ]] && echo "Loaded modules : ${modules[*]}"
112120
if [[ "${boot_splash}" = true ]]; then
113121
echo "Plymouth : Yes"
114122
else

0 commit comments

Comments
 (0)