File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -488,7 +488,8 @@ prepare_build() {
488488
489489 local module_check
490490 module_check (){
491- if [[ ! " $( bash " ${tools_dir} /module.sh" check " ${1} " ) " = " correct" ]]; then
491+ msg_debug " Checking ${1} module ..."
492+ if ! bash " ${tools_dir} /module.sh" check " ${1} " ; then
492493 msg_error " Module ${1} is not available." " 1" ;
493494 fi
494495 }
Original file line number Diff line number Diff line change @@ -31,12 +31,15 @@ _help() {
3131 echo " General options:"
3232 echo " -v | --version [ver] Specifies the AlterISO version"
3333 echo " -h | --help This help message"
34+ echo
35+ echo " check exit code:"
36+ echo " 0 (correct) 1 (incorrect) 2 (other)"
3437}
3538
3639check (){
3740 if (( "${# } " == 0 )) || (( "${# } " >= 2 )) ; then
3841 _help
39- exit 1
42+ exit 2
4043 fi
4144 local _version
4245 if [[ -f " ${module_dir} /${1} /alteriso" ]]; then
@@ -46,10 +49,10 @@ check(){
4649 unset alteriso
4750 ) "
4851 if (( "$(echo "${_version} " | cut - d "." - f 1 )" == "$(echo "${alteriso_version} " | cut - d "." - f 1 )" )) ; then
49- echo " correct "
52+ exit 0
5053 fi
5154 else
52- echo " incorrect "
55+ exit 1
5356 fi
5457}
5558
You can’t perform that action at this time.
0 commit comments