@@ -34,7 +34,7 @@ norepopkg=()
34
34
# Load config file
35
35
[[ ! -f " ${defaultconfig} " ]] && " ${tools_dir} /msg.sh" -a ' build.sh' error " ${defaultconfig} was not found." && exit 1
36
36
for config in " ${defaultconfig} " " ${script_path} /custom.conf" ; do
37
- [[ -f " ${config} " ]] && source " ${config} "
37
+ [[ -f " ${config} " ]] && source " ${config} " && loaded_files+=( " ${config} " )
38
38
done
39
39
40
40
umask 0022
@@ -448,6 +448,7 @@ prepare_build() {
448
448
[[ " ${customized_password} " = false ]] && password=" ${defaultpassword} "
449
449
450
450
# 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"
451
452
[[ " ${gitversion} " = true ]] && iso_version=" ${iso_version} -${gitrev} "
452
453
453
454
# Generate tar file name
@@ -1091,14 +1092,6 @@ while true; do
1091
1092
username=" $( echo -n " ${2} " | sed ' s/ //g' | tr ' [:upper:]' ' [:lower:]' ) "
1092
1093
shift 2
1093
1094
;;
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
- ;;
1102
1095
--nodebug)
1103
1096
debug=false
1104
1097
msgdebug=false
@@ -1137,6 +1130,7 @@ while true; do
1137
1130
-r | --tarball ) tarball=true && shift 1 ;;
1138
1131
-w | --work ) work_dir=" ${2} " && shift 2 ;;
1139
1132
-x | --bash-debug ) bash_debug=true && shift 1 ;;
1133
+ --gitversion ) gitversion=true && shift 1 ;;
1140
1134
--noconfirm ) noconfirm=true && shift 1 ;;
1141
1135
--confirm ) noconfirm=false && shift 1 ;;
1142
1136
--nodepend ) nodepend=true && shift 1 ;;
0 commit comments