-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scripts to backup and restore settings modified by .osx #58
Conversation
.osx_backup makes a 'backup' of the OS settings that the .osx script changes .osx_restore uses the file ".osx_settings_backup" the backup scripts creates and to restore the original values
If new settings are added to .osx, it won't be possible to run the script again without deleting the backup and then it would be restoring already modified settings. It needs to compare the settings which were already backed up, with the ones present in .osx. Even then, there is a change that you are backing up previously modified values. Although the backup script has a lot of value, another useful solution would be to have a .osx.reset which is similar to .osx , but configured with the OS X default values. For each new setting added to .osx, a equivalent setting with the defautl value would have to be added to .osx.reset. |
Okay, so I get what you're saying but I think there is already a way around the problem. To clarify, the problem is essentially this: "New settings being added to .osx, woud not be present in the backup." To get around this:
You could even incorporate this into a single script. BTW, excuse the large number of commits in the pull request. |
* 'master' of github.com:MozMorris/dotfiles: Friendly output messages and regex on '-array-add' as a setting type Handle many of the backup settings automatically using some grep and sed power
I noticed quite a few people were worried about permanently losing the OS defaults, so I created a couple of scripts to backup and then restore the settings.
The backup script
osx_backup.sh
needs to be run before.osx
. This could potentially be called from.osx
automatically.The settings are backed up to a text file
.osx_settings_backup
in the format<setting> : <value>
. This file I've added to the ignores.The restore script
osx_restore.sh
uses the backup file to restore all the settings.I've been using both scripts with success on a couple of machines. Not a problem if you think it's overkill, but it might come in handy for a few people. Let me know what you think.