minor changes: debug output
This commit is contained in:
parent
0c22ec9ae8
commit
87d50bd5b2
30
git_helpers
30
git_helpers
@ -1,16 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# set -x
|
# set -x
|
||||||
|
|
||||||
# if [ ${git_helpers_sourced:-1} = "1" ]; then
|
|
||||||
# readonly git_helpers_sourced=${BASH_SOURCE[0]}
|
|
||||||
#else
|
|
||||||
# return 0
|
|
||||||
#fi
|
|
||||||
|
|
||||||
|
|
||||||
source ./log_helpers
|
source ./log_helpers
|
||||||
source ./general_utils
|
source ./general_utils
|
||||||
|
|
||||||
|
|
||||||
|
# if [ ${git_helpers_sourced:-1} = "1" ]; then
|
||||||
|
# readonly git_helpers_sourced=${BASH_SOURCE[0]}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
readonly GIT_SSL_NO_VERIFY=true
|
readonly GIT_SSL_NO_VERIFY=true
|
||||||
readonly repository_already_up_to_date=2
|
readonly repository_already_up_to_date=2
|
||||||
|
|
||||||
@ -28,7 +27,7 @@ exec_git_command () {
|
|||||||
#
|
#
|
||||||
latest_commit () {
|
latest_commit () {
|
||||||
local func="${FUNCNAME[0]}"
|
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)
|
local c=$(git reflog | grep "HEAD@{0}" | cut -d" " -f1)
|
||||||
if ! [ -z "$c" ]; then
|
if ! [ -z "$c" ]; then
|
||||||
if grep -qE "^[[:xdigit:]]{6,}$" <<< $c; then
|
if grep -qE "^[[:xdigit:]]{6,}$" <<< $c; then
|
||||||
@ -82,14 +81,14 @@ clone_customer_repository () {
|
|||||||
cd -
|
cd -
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# the directory is not empty, so we assume the customer-repository
|
# the directory is not empty, so we assume the
|
||||||
# has been cloned alread
|
# customer-repository has been cloned already
|
||||||
if ! [[ -d ./${workspace_dir}/$customer_id ]]; then
|
if ! [[ -d ./${workspace_dir}/$customer_id ]]; then
|
||||||
local m="wrong repository: $(ls -d './${workspace_dir}/*')"
|
log_fatal "$func:${LINENO} "\
|
||||||
log_fatal "$func:${LINENO} $m"
|
"wrong repository: $(ls -d './${workspace_dir}/*')"
|
||||||
else
|
else
|
||||||
log_debug \
|
local __m= "./${workspace_dir}/$customer_id exists"
|
||||||
"$func:${LINENO} ./${workspace_dir}/$customer_id exists"
|
log_debug "$func:${LINENO} $__m"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -112,7 +111,7 @@ cd_customer_repository () {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if ! { cd $repository_dir; } ; then
|
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
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -251,3 +250,4 @@ changed_file_names () {
|
|||||||
"while in $PWD"
|
"while in $PWD"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
# fi
|
||||||
|
Loading…
Reference in New Issue
Block a user