>>>>> -- [[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]]