From b9caeb2e3c58f778762a7b20f38bed792068d9cb Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Sun, 5 Jun 2022 19:23:43 +0200 Subject: [PATCH] changed_file_names: using the git repository path as serach criterion --- git_helpers | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/git_helpers b/git_helpers index e7a0243..70a6c2b 100755 --- a/git_helpers +++ b/git_helpers @@ -139,16 +139,17 @@ cd_home () { pull_customer_repository () { local func="${FUNCNAME[0]}" - if ! cd_customer_repository ; then + if ! cd_customer_repository; then return 1 fi local commit_before_pull=$(latest_commit) if [ -z $commit_before_pull ]; then + log_warn "$func:${LINENO}: commit_before_pull empty" cd_home ; return 1 fi - 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') @@ -256,12 +257,13 @@ changed_file_names () { log_debug "$func:${LINENO}: git_res=$git_res" local file_names="" 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 file_names="$f $file_names" else file_names="$f" fi + log_debug "$func:${LINENO}: $f found in $git_res" fi done