minor changes: debug output

This commit is contained in:
Gerhard Hoffmann 2022-06-04 18:13:27 +02:00
parent 0c22ec9ae8
commit 87d50bd5b2

View File

@ -1,16 +1,15 @@
#!/bin/bash
# set -x
# if [ ${git_helpers_sourced:-1} = "1" ]; then
# readonly git_helpers_sourced=${BASH_SOURCE[0]}
#else
# return 0
#fi
source ./log_helpers
source ./general_utils
# if [ ${git_helpers_sourced:-1} = "1" ]; then
# readonly git_helpers_sourced=${BASH_SOURCE[0]}
readonly GIT_SSL_NO_VERIFY=true
readonly repository_already_up_to_date=2
@ -28,7 +27,7 @@ exec_git_command () {
#
latest_commit () {
local func="${FUNCNAME[0]}"
# git reflog -> 46c5896 HEAD@{0}: commit: Made update_helpers.sh executable
# git reflog -> 46c5896 HEAD@{0}: commit: Made update_helpers executable
local c=$(git reflog | grep "HEAD@{0}" | cut -d" " -f1)
if ! [ -z "$c" ]; then
if grep -qE "^[[:xdigit:]]{6,}$" <<< $c; then
@ -82,14 +81,14 @@ clone_customer_repository () {
cd -
fi
else
# the directory is not empty, so we assume the customer-repository
# has been cloned alread
# the directory is not empty, so we assume the
# customer-repository has been cloned already
if ! [[ -d ./${workspace_dir}/$customer_id ]]; then
local m="wrong repository: $(ls -d './${workspace_dir}/*')"
log_fatal "$func:${LINENO} $m"
log_fatal "$func:${LINENO} "\
"wrong repository: $(ls -d './${workspace_dir}/*')"
else
log_debug \
"$func:${LINENO} ./${workspace_dir}/$customer_id exists"
local __m= "./${workspace_dir}/$customer_id exists"
log_debug "$func:${LINENO} $__m"
return 0
fi
fi
@ -112,7 +111,7 @@ cd_customer_repository () {
fi
if ! { cd $repository_dir; } ; then
log_crit "$func:${LINENO}: cannot change to $repository_dir!"
log_crit "$func:${LINENO}: cannot cd to $repository_dir!"
return 1
fi
@ -251,3 +250,4 @@ changed_file_names () {
"while in $PWD"
fi
}
# fi