diff --git a/build-tools/build-srpms-parallel b/build-tools/build-srpms-parallel index 3e667986..f8e59e01 100755 --- a/build-tools/build-srpms-parallel +++ b/build-tools/build-srpms-parallel @@ -768,7 +768,7 @@ build_dir_srpm () { # Find age of youngest input file. # We will apply this as the creation/modification timestamp of the src.rpm we produce. # - AGE=$(find $PKG_BASE $ORIG_SRPM_PATH -type f -exec stat --format '%Y' "{}" \; | grep -v '[/][.]git$' | grep -v '[/][.]git[/]' | sort -nr | head -n 1) + AGE=$(find $PKG_BASE $ORIG_SRPM_PATH ! -path '*/.git/*' ! -path '*/.tox/*' -type f -exec stat --format '%Y' "{}" \; | sort -nr | head -n 1) if [ -f $PKG_BASE/$DATA ]; then AGE2=$( cd $PKG_BASE @@ -787,7 +787,7 @@ build_dir_srpm () { if [ "x$PATH_LIST" == "x" ]; then echo "0" else - AGE2=$(find -L $PATH_LIST -type f -exec stat --format '%Y' "{}" \; | grep -v '[/][.]git$' | grep -v '[/][.]git[/]' | sort -nr | head -n 1) + AGE2=$(find -L $PATH_LIST ! -path '*/.git/*' ! -path '*/.tox/*' -type f -exec stat --format '%Y' "{}" \; | sort -nr | head -n 1) echo "$AGE2" fi ) @@ -1115,7 +1115,7 @@ build_dir_spec () { # Find age of youngest input file. # We will apply this as the creation/modification timestamp of the src.rpm we produce. # - AGE=$(find $PKG_BASE -type f -exec stat --format '%Y' "{}" \; | grep -v '[/][.]git$' | grep -v '[/][.]git[/]' | sort -nr | head -n 1) + AGE=$(find $PKG_BASE ! -path '*/.git/*' ! -path '*/.tox/*' -type f -exec stat --format '%Y' "{}" \; | sort -nr | head -n 1) if [ -f $PKG_BASE/$DATA ]; then AGE2=$( cd $PKG_BASE @@ -1138,7 +1138,7 @@ build_dir_spec () { if [ "x$PATH_LIST" == "x" ]; then echo "0" else - AGE2=$(find -L $PATH_LIST -type f -exec stat --format '%Y' "{}" \; | grep -v '[/][.]git$' | grep -v '[/][.]git[/]' | sort -nr | head -n 1) + AGE2=$(find -L $PATH_LIST ! -path '*/.git/*' ! -path '*/.tox/*' -type f -exec stat --format '%Y' "{}" \; | sort -nr | head -n 1) echo "$AGE2" fi ) diff --git a/build-tools/build-srpms-serial b/build-tools/build-srpms-serial index 37d4e4bb..a9cceeab 100755 --- a/build-tools/build-srpms-serial +++ b/build-tools/build-srpms-serial @@ -747,7 +747,7 @@ build_dir_srpm () { # Find age of youngest input file. # We will apply this as the creation/modification timestamp of the src.rpm we produce. # - AGE=$(find $PKG_BASE $ORIG_SRPM_PATH -type f -exec stat --format '%Y' "{}" \; | grep -v '[/][.]git$' | grep -v '[/][.]git[/]' | sort -nr | head -n 1) + AGE=$(find $PKG_BASE $ORIG_SRPM_PATH ! -path '*/.git/*' ! -path '*/.tox/*' -type f -exec stat --format '%Y' "{}" \; | sort -nr | head -n 1) if [ -f $PKG_BASE/$DATA ]; then AGE2=$( cd $PKG_BASE @@ -765,7 +765,7 @@ build_dir_srpm () { if [ "x$PATH_LIST" == "x" ]; then echo "0" else - AGE2=$(find -L $PATH_LIST -type f -exec stat --format '%Y' "{}" \; | grep -v '[/][.]git$' | grep -v '[/][.]git[/]' | sort -nr | head -n 1) + AGE2=$(find -L $PATH_LIST ! -path '*/.git/*' ! -path '*/.tox/*' -type f -exec stat --format '%Y' "{}" \; | sort -nr | head -n 1) echo "$AGE2" fi ) @@ -1093,7 +1093,7 @@ build_dir_spec () { # Find age of youngest input file. # We will apply this as the creation/modification timestamp of the src.rpm we produce. # - AGE=$(find $PKG_BASE -type f -exec stat --format '%Y' "{}" \; | grep -v '[/][.]git$' | grep -v '[/][.]git[/]' | sort -nr | head -n 1) + AGE=$(find $PKG_BASE ! -path '*/.git/*' ! -path '*/.tox/*' -type f -exec stat --format '%Y' "{}" \; | sort -nr | head -n 1) if [ -f $PKG_BASE/$DATA ]; then AGE2=$( cd $PKG_BASE @@ -1115,7 +1115,7 @@ build_dir_spec () { if [ "x$PATH_LIST" == "x" ]; then echo "0" else - AGE2=$(find -L $PATH_LIST -type f -exec stat --format '%Y' "{}" \; | grep -v '[/][.]git$' | grep -v '[/][.]git[/]' | sort -nr | head -n 1) + AGE2=$(find -L $PATH_LIST ! -path '*/.git/*' ! -path '*/.tox/*' -type f -exec stat --format '%Y' "{}" \; | sort -nr | head -n 1) echo "$AGE2" fi ) diff --git a/build-tools/srpm-utils b/build-tools/srpm-utils index d035f346..e9299af8 100644 --- a/build-tools/srpm-utils +++ b/build-tools/srpm-utils @@ -3411,8 +3411,8 @@ srpm_source_file_list () { # Create lists of input files (INPUT_FILES) and symlinks (INPUT_LINKS). # First elements are absolute paths... while read path; do - find "${path}" -type f | grep -v -e '[/][.]git$' -e '[/][.]git[/]' -e '[/][.]tox[/]' >> $INPUT_FILES - find "${path}" -type l | grep -v -e '[/][.]git$' -e '[/][.]git[/]' -e '[/][.]tox[/]' >> $INPUT_LINKS + find "${path}" ! -path '*/.git/*' ! -path '*/.tox/*' -type f >> $INPUT_FILES + find "${path}" ! -path '*/.git/*' ! -path '*/.tox/*' -type l >> $INPUT_LINKS done < "${INPUT_SOURCES}" # Create sorted, unique list of canonical paths