aboutsummaryrefslogtreecommitdiff
path: root/fixdates.sh
diff options
context:
space:
mode:
authorGianni Ceccarelli <gianni.ceccarelli@net-a-porter.com>2013-11-19 12:55:24 +0000
committerGianni Ceccarelli <gianni.ceccarelli@net-a-porter.com>2013-11-19 12:55:24 +0000
commit1675ca4721614067f8ad493d6958e2ea1d8a51e0 (patch)
treec973acee7040a523846353f91459838c3c0407cd /fixdates.sh
parentignore files (diff)
downloadWebCoso-1675ca4721614067f8ad493d6958e2ea1d8a51e0.tar.gz
WebCoso-1675ca4721614067f8ad493d6958e2ea1d8a51e0.tar.bz2
WebCoso-1675ca4721614067f8ad493d6958e2ea1d8a51e0.zip
make output a bit more stable
Diffstat (limited to 'fixdates.sh')
-rwxr-xr-xfixdates.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/fixdates.sh b/fixdates.sh
new file mode 100755
index 0000000..fc7f32a
--- /dev/null
+++ b/fixdates.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+thisdir="$(cd "$(dirname "$0")";pwd)"
+cd "$thisdir"
+git ls-files -z | \
+while read -d $'\0' filename; do
+ date="$(git log -n 1 --pretty='format:%ct' -- "$filename")"
+ if [[ -n "$date" ]]; then
+ echo "updating <$filename> to date <$date>"
+ touch -d @"$date" "$filename"
+ fi
+done