diff --git a/functions/main b/functions/main index dbb402aa..54e123bf 100644 --- a/functions/main +++ b/functions/main @@ -135,7 +135,7 @@ generate_template_list() { else # arguments (file list/pattern) provided via cmdline for arg in $* ; do - if echo $file | grep -q "${arg}" ; then + if echo $file | grep -q -- "${arg}" ; then echo "$file" >> "${filelist_prepared}" fi done @@ -157,21 +157,21 @@ generate_template_list() { # foo.customtt.tt2.sp{1,2} if [ -n "${HA_FILE:-}" ] ; then - if grep -q "^${normalized_filename}.customtt.tt2${HA_FILE:-}" "${filelist_prepared}" ; then + if grep -q -- "^${normalized_filename}.customtt.tt2${HA_FILE:-}" "${filelist_prepared}" ; then echo "${normalized_filename}.customtt.tt2${HA_FILE:-}" >> "${filelist_final}" continue fi fi # foo.customtt.tt2 - if grep -q "^${normalized_filename}.customtt.tt2$" "${filelist_prepared}" ; then + if grep -q -- "^${normalized_filename}.customtt.tt2$" "${filelist_prepared}" ; then echo "${normalized_filename}.customtt.tt2" >> "${filelist_final}" continue fi # foo.tt2.sp{1,2} if [ -n "${HA_FILE:-}" ] ; then - if grep -q "^${normalized_filename}.tt2${HA_FILE}" "${filelist_prepared}" ; then + if grep -q -- "^${normalized_filename}.tt2${HA_FILE}" "${filelist_prepared}" ; then echo "${normalized_filename}.tt2${HA_FILE}" >> "${filelist_final}" continue fi diff --git a/scripts/build b/scripts/build index bddd3259..9580ec74 100755 --- a/scripts/build +++ b/scripts/build @@ -77,7 +77,7 @@ else if [ -n "${EXTRA_CONFIG_FILES:-}" ] ; then for file in $EXTRA_CONFIG_FILES ; do - if git diff-index --name-only HEAD | grep -qe "$(basename $file)" ; then + if git diff-index --name-only HEAD | grep -qe -- "$(basename $file)" ; then log_debug "modification in EXTRA_CONFIG_FILES file $file found" trigger_rebuild=true break # no reason for further checks