Skip to content
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

Add configuration options for backup files #28

Closed
nfarrar opened this issue Nov 14, 2015 · 2 comments
Closed

Add configuration options for backup files #28

nfarrar opened this issue Nov 14, 2015 · 2 comments

Comments

@nfarrar
Copy link

nfarrar commented Nov 14, 2015

When rerunning brew file init (when you already have a brew file, but things got out of sync) - homebrew-file creates the backup file 'brewfile.bak' in the same directory as the original file. It would be helpful to timestamp this file and allow a configurable path.

I keep my brewfile synchronized across several systems, because of this, the brewfile can get out of sync pretty easily. It would be very helpful to:

  • change the save path for the brewfile backup (so I can have backups saved to $XDG_CACHE_HOME/homebrew/*.bak, rather than polluting my config directories
  • have them timestamped, so that each backup doesn't overwrite the previous backup
  • have them timestamped, so that i can easily reference the date they were relevant

Any possibility of adding this?

@nfarrar nfarrar changed the title Backup Options Configurable Backup Options Nov 14, 2015
@nfarrar nfarrar changed the title Configurable Backup Options Add configuration options for backup files Nov 14, 2015
@rcmdnk
Copy link
Owner

rcmdnk commented Nov 15, 2015

I think the backup is no longer needed because it is normally managed in git repository or cloud storage in these a history is available.

Then, I implemented new option of -b, --backup, and environment variable HOMEBREW_BREWFILE_BACKUP to set the backup file name.
The default is empty. If it is empty, no backup file is made.

@nfarrar
Copy link
Author

nfarrar commented Nov 15, 2015

Thanks, I'll try it out!

@rcmdnk rcmdnk closed this as completed Nov 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants