11#! /usr/bin/env bash
22script_path=" $( cd -P " $( dirname " $( readlink -f " $0 " ) " ) " && cd .. && pwd ) "
33tools_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"
2628if ! OPT=" $( getopt -o " ${OPTS} " -l " ${OPTL} " -- " ${@ } " ) " ; then
2729 exit 1
2830fi
@@ -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
8692done
8793
94+ # Check values
8895variable_list=( " arch" " boot_splash" " channel_name" " iso_publisher" " kernel" " iso_application" " password" " username" " iso_version" )
8996
9097error=false
@@ -109,6 +116,7 @@ echo "Live user name : ${username}"
109116echo " Live user pass : ${password} "
110117echo " Kernel name : ${kernel} "
111118echo " Kernel path : ${kernel_filename} "
119+ [[ " ${# modules[@]} " != 0 ]] && echo " Loaded modules : ${modules[*]} "
112120if [[ " ${boot_splash} " = true ]]; then
113121 echo " Plymouth : Yes"
114122else
0 commit comments