Backing up SD Prefs & Applescript Font Prefs
Backing up SD Prefs & Applescript Font Prefs
- Subject: Backing up SD Prefs & Applescript Font Prefs
- From: Christopher Stone <email@hidden>
- Date: Sat, 29 Oct 2011 16:28:49 -0500
Hey Folks,
In view of certain circumstances I wrote a script to backup my Script Debugger preferences.
And since I went to the trouble I decided to use the same skeleton to backup my Applescript Font Preferences.
Since I'm presently working to improve my proficiency with the shell I used it rather than Applescript.
These functions are in my .profile file, so they can be called from the Terminal, but they could easily be adapted to a 'do shell script' call.
AFAIK there's no way to force rsync to create intermediate directories which is why I resorted to 'mkdir', although if someone knows different I'd be happy to hear.
rsync is overkill for the single file copy, but it's really handy for the globbed multi-file/folder backup.
--
Chris
#============================================================================================================
# BACKUP APPLESCRIPT FONT PREFERENCES
function bkaf()
{
echo "";
AFPREF=~/Library/'Application Support'/Script_Support/"$(date '+Applescript_Font_Prefs_(%Y-%m-%d_%H%M%S)')/";
mkdir -p "$AFPREF";
rsync -av ~/Library/Preferences/com.apple.applescript.plist "$AFPREF";
echo "";
}
#============================================================================================================
# BACKUP SCRIPT DEBUGGER PREFERENCES
function bksd()
{
echo "";
SDPREF=~/Library/'Application Support'/Script_Support/"$(date '+SD_Prefs_(%Y-%m-%d_%H%M%S)')/";
mkdir -p "$SDPREF";
rsync -av --exclude "*.DS_Store" --exclude '*.lockfile' ~/Library/Preferences/*Script*Debugger* "$SDPREF";
echo "";
}
#============================================================================================================
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden