This will eventually be used to help improve arduino caching behaviorpull/914/head
parent
25f0d2fc66
commit
beb963d341
@ -0,0 +1,16 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
# This script sets all of the files inside src and example to have mtimes
|
||||
# that match the times of the last git commit that touched each file
|
||||
|
||||
# This can be useful when build tools depend on file timestamps to
|
||||
# make caching decisions
|
||||
|
||||
for file in `find src examples -type f`
|
||||
do
|
||||
timestamp=$(git log --pretty=format:%ad --date=format:%Y%m%d%H%M.%S -n 1 HEAD "$file" 2> /dev/null)
|
||||
if [ "x$timestamp" != "x" ]; then
|
||||
touch -t "$timestamp" "$file"
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in new issue