From a1e7bba51f0d4f0eb7eb6eee2196b1f60af3088f Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Sun, 14 Feb 2010 13:21:51 -0500 Subject: [PATCH] This file as it stood at my last edit of it back in 2010. --- get-emacs-backup-files-into-git.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get-emacs-backup-files-into-git.sh b/get-emacs-backup-files-into-git.sh index e7354d0..6e80a8d 100755 --- a/get-emacs-backup-files-into-git.sh +++ b/get-emacs-backup-files-into-git.sh @@ -1,9 +1,9 @@ #!/bin/sh for i in `ls -r1t $1.~*~`; do - date=`stat -c '%y' $i` + date=`stat -c '%y' $i | perl -pe 's/(\.\d+) / /'` logdate=`stat -c '%y' $i|perl -pe 's/^(\S+)\s+.*$/$1/;'` - echo $date $i + echo $logdate $date $i cp -pa $i $2 export GIT_AUTHOR_DATE="$date" git commit -m "Brought in file from ~ backup files, as it was on $logdate" $2