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