From 87d50bd5b27d4df92eba717413fd1737f3137fa5 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Sat, 4 Jun 2022 18:13:27 +0200 Subject: [PATCH] minor changes: debug output --- git_helpers | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/git_helpers b/git_helpers index 7e3e0c8..86a2be6 100755 --- a/git_helpers +++ b/git_helpers @@ -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