diff --git a/bin/set-timestamps-from-git b/bin/set-timestamps-from-git index 7b9d99ce..fea2cc32 100755 --- a/bin/set-timestamps-from-git +++ b/bin/set-timestamps-from-git @@ -6,11 +6,10 @@ # This can be useful when build tools depend on file timestamps to # make caching decisions -for file in $(find src examples -type f -print) -do - timestamp=$(git log --pretty=format:%ad --date=format:%Y%m%d%H%M.%S -n 1 HEAD "$file" 2> /dev/null) +find src examples -type f -exec sh -c ' + timestamp=$(git log --pretty=format:%ad --date=format:%Y%m%d%H%M.%S -n 1 HEAD "$1" 2> /dev/null) if [ "x$timestamp" != "x" ]; then - touch -t "$timestamp" "$file" + touch -t "$timestamp" "$1" fi -done +' sh {} \;