• Download Gist
Textmate bundle command to make backup on save
1 2 3 4 5 6
# Save a copy of this file to the backup directory
THEDATE=`date +"%Y%m%d"`
THETIME=`date +"%H%M%S"`
filedata=`cat`
mkdir -p "$TM_BACKUP_DIR/$THEDATE"
echo "$filedata" > "$TM_BACKUP_DIR/$THEDATE/$TM_FILENAME.$THEDATE.$THETIME.backup"

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.