X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/6c4a2a88a871af5ac42cd80aa48684b114849e3d..1c044400184648cbb511b796ad0499e53b21d084:/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn diff --git a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn index cb14df77f..6ce576db1 100644 --- a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn +++ b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn @@ -89,19 +89,21 @@ Do I have it right? >>>>> -- [[Jon]] > A quick workaround for me to get modification times right is the following -> little zsh script, which unfortynately only works for git: +> little zsh script, which unfortunately only works for git: #!/usr/bin/env zsh set +x for FILE in **/*(.); do - TIMES="`git log --follow --pretty=format:%ai $FILE`" - #CTIME="`echo $TIMES | tail -n1`" + TIMES="`git log --pretty=format:%ai $FILE`" MTIME="`echo $TIMES | head -n1`" - echo touch -m -d "$MTIME" $FILE - touch -m -d "$MTIME" $FILE + if [ ! -z $MTIME ]; then + echo touch -m -d "$MTIME" $FILE + touch -m -d "$MTIME" $FILE + fi done +> --[[David_Riebenbauer]]