]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - doc/forum/How_does_ikiwiki_remember_times__63__.mdwn
help request with plugin draft
[git.ikiwiki.info.git] / doc / forum / How_does_ikiwiki_remember_times__63__.mdwn
index 5522cbf4505b3e3213129c29d73be367eb9365b7..6ce576db118cb1153c43cce898e3ec524aeb8b02 100644 (file)
@@ -87,3 +87,23 @@ Do I have it right?
     $EDITOR "$pagename"
 
 >>>>> -- [[Jon]]
+
+> A quick workaround for me to get modification times right is the following
+> little zsh script, which unfortunately only works for git:
+
+    #!/usr/bin/env zsh
+    
+    set +x
+    
+    for FILE in **/*(.); do
+      TIMES="`git log --pretty=format:%ai $FILE`"
+      MTIME="`echo $TIMES | head -n1`"
+    
+      if [ ! -z $MTIME ]; then
+        echo  touch -m -d "$MTIME" $FILE
+        touch -m -d "$MTIME" $FILE
+      fi
+    
+    done
+
+> --[[David_Riebenbauer]]