@@ -34,7 +34,7 @@ norepopkg=()
3434# Load config file
3535[[ ! -f " ${defaultconfig} " ]] && " ${tools_dir} /msg.sh" -a ' build.sh' error " ${defaultconfig} was not found." && exit 1
3636for config in " ${defaultconfig} " " ${script_path} /custom.conf" ; do
37- [[ -f " ${config} " ]] && source " ${config} "
37+ [[ -f " ${config} " ]] && source " ${config} " && loaded_files+=( " ${config} " )
3838done
3939
4040umask 0022
@@ -448,6 +448,7 @@ prepare_build() {
448448 [[ " ${customized_password} " = false ]] && password=" ${defaultpassword} "
449449
450450 # gitversion
451+ [[ ! -d " ${script_path} /.git" ]] && [[ " ${gitversion} " = true ]] && msg_error " There is no git directory. You need to use git clone to use this feature." " 1"
451452 [[ " ${gitversion} " = true ]] && iso_version=" ${iso_version} -${gitrev} "
452453
453454 # Generate tar file name
@@ -1091,14 +1092,6 @@ while true; do
10911092 username=" $( echo -n " ${2} " | sed ' s/ //g' | tr ' [:upper:]' ' [:lower:]' ) "
10921093 shift 2
10931094 ;;
1094- --gitversion)
1095- if [[ -d " ${script_path} /.git" ]]; then
1096- gitversion=true
1097- else
1098- msg_error " There is no git directory. You need to use git clone to use this feature." " 1"
1099- fi
1100- shift 1
1101- ;;
11021095 --nodebug)
11031096 debug=false
11041097 msgdebug=false
@@ -1137,6 +1130,7 @@ while true; do
11371130 -r | --tarball ) tarball=true && shift 1 ;;
11381131 -w | --work ) work_dir=" ${2} " && shift 2 ;;
11391132 -x | --bash-debug ) bash_debug=true && shift 1 ;;
1133+ --gitversion ) gitversion=true && shift 1 ;;
11401134 --noconfirm ) noconfirm=true && shift 1 ;;
11411135 --confirm ) noconfirm=false && shift 1 ;;
11421136 --nodepend ) nodepend=true && shift 1 ;;
0 commit comments