changed_file_names: using the git repository path as serach criterion

This commit is contained in:
Gerhard Hoffmann 2022-06-05 19:23:43 +02:00
parent 0ee446dcc0
commit b9caeb2e3c

View File

@ -145,10 +145,11 @@ pull_customer_repository () {
local commit_before_pull=$(latest_commit) local commit_before_pull=$(latest_commit)
if [ -z $commit_before_pull ]; then if [ -z $commit_before_pull ]; then
log_warn "$func:${LINENO}: commit_before_pull empty"
cd_home ; return 1 cd_home ; return 1
fi fi
log_debug "$func:${LINENO}: commit_before_pull=$commit_before_pull" log_debug "$func:${LINENO}: commit_before_pull=$commit_before_pull"
log_debug "$func:${LINENO}: executing 'git pull'..."
local git_result=$(exec_git_command 'git pull') local git_result=$(exec_git_command 'git pull')
@ -256,12 +257,13 @@ changed_file_names () {
log_debug "$func:${LINENO}: git_res=$git_res" log_debug "$func:${LINENO}: git_res=$git_res"
local file_names="" local file_names=""
for f in ${KNOWN_FILES[@]} ; do for f in ${KNOWN_FILES[@]} ; do
if grep -qE ".*\s+${f}\s+.*" <<< $git_res; then if grep -qE "${f}" <<< "$git_res"; then
if ! [ -z $file_names ]; then if ! [ -z $file_names ]; then
file_names="$f $file_names" file_names="$f $file_names"
else else
file_names="$f" file_names="$f"
fi fi
log_debug "$func:${LINENO}: $f found in $git_res"
fi fi
done done