@@ -11,6 +11,7 @@ aur=false
1111pkgdir_name=" packages"
1212extra=false
1313line=false
14+ debug=false
1415
1516arch=" "
1617channel_dir=" "
@@ -31,6 +32,7 @@ _help() {
3132 echo " -a | --arch [arch] Specify the architecture"
3233 echo " -b | --boot-splash Enable boot splash"
3334 echo " -c | --channel [dir] Specify the channel directory"
35+ echo " -d | --debug Enable debug message"
3436 echo " -e | --extra Include extra packages"
3537 echo " -k | --kernel [kernel] Specify the kernel"
3638 echo " -l | --locale [locale] Specify the locale"
@@ -55,22 +57,24 @@ msg_info() {
5557}
5658
5759msg_debug () {
58- " ${script_path} /tools/msg.sh" -s " 5" -a " pkglist.sh" -l " Debug" -r " magenta" error " ${1} "
60+ if [[ " ${debug} " = true ]]; then
61+ " ${script_path} /tools/msg.sh" -s " 5" -a " pkglist.sh" -l " Debug" -r " magenta" error " ${1} "
62+ fi
5963}
6064
6165
6266# Parse options
6367ARGUMENT=" ${@ } "
64- opt_short=" a:bc:ek :l:h"
65- opt_long=" arch:,boot-splash,channel:,extra,kernel:,locale:,aur,help,line"
68+ opt_short=" a:bc:dek :l:h"
69+ opt_long=" arch:,boot-splash,channel:,debug, extra,kernel:,locale:,aur,help,line"
6670OPT=$( getopt -o ${opt_short} -l ${opt_long} -- ${ARGUMENT} )
6771[[ ${?} != 0 ]] && exit 1
6872
6973eval set -- " ${OPT} "
7074unset OPT opt_short opt_long
7175
7276while true ; do
73- case ${1} in
77+ case " ${1} " in
7478 -a | --arch)
7579 arch=" ${2} "
7680 shift 2
@@ -83,6 +87,10 @@ while true; do
8387 channel_dir=" ${2} "
8488 shift 2
8589 ;;
90+ -d | --debug)
91+ debug=true
92+ shift 1
93+ ;;
8694 -e | --extra)
8795 extra=true
8896 shift 1
0 commit comments