summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2017-06-26 11:43:18 +0200
committerFabian Groffen <grobian@gentoo.org>2017-06-26 11:43:18 +0200
commite37573a40080b2f5057f10f2a94ed7493246c850 (patch)
treee61670e96cca309becd7370457aefbc438868815 /scripts
parentupdate-rsync-master: herds.xml is long gone (diff)
downloadprefix-e37573a40080b2f5057f10f2a94ed7493246c850.tar.gz
prefix-e37573a40080b2f5057f10f2a94ed7493246c850.tar.bz2
prefix-e37573a40080b2f5057f10f2a94ed7493246c850.zip
set-git-mtimes.sh: add inefficient script to set mtimes matching last git commit
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/rsync-generation/set-git-mtimes.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/rsync-generation/set-git-mtimes.sh b/scripts/rsync-generation/set-git-mtimes.sh
new file mode 100755
index 0000000000..9615caabfb
--- /dev/null
+++ b/scripts/rsync-generation/set-git-mtimes.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+git ls-files | \
+while read fname ; do
+ touch -m -t $(git log --pretty=format:'%cd' -n 1 --date=format-local:'%Y%m%d%H%M.%S' -- "${fname}") "${fname}"
+done