Update the timestamp setting script ti make shellcheck happy

pull/914/head
Jesse Vincent 4 years ago
parent 2d4b22db75
commit d7a45afdb5
No known key found for this signature in database
GPG Key ID: CC228463465E40BC

@ -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 {} \;

Loading…
Cancel
Save