lra / mackup

Keep your application settings in sync (OS X/Linux)
GNU General Public License v3.0
14.6k stars 932 forks source link

CLI option: path to Mackup's configuration file (default: `~/.mackup.cfg`) #1857

Open tpvasconcelos opened 2 years ago

tpvasconcelos commented 2 years ago

Hey @lra! Thanks for Mackup! Been using it for a few years now šŸš€

I would be interested in adding a CLI option to point to a specific configuration file.

This could be useful for users that want to backup different settings to different remote locations. For my specific use case, I keep one config file for dotfiles that I share with others and one for other settings that I backup elsewhere.

Let me know if you'd be happy to add this feature to Mackup. Happy to contribute!

Regarding the flag name, I think something explicit like --config-file would be a good idea. e.g.:

 $ mackup --help
 Mackup.

 Keep your application settings in sync.
 Copyright (C) 2013-2021 Laurent Raufaste <http://glop.org/>

 Usage:
   mackup list
   mackup [options] backup
   mackup [options] restore
   mackup show <application>
   mackup [options] uninstall
   mackup (-h | --help)
   mackup --version

 Options:
   -h --help         Show this screen.
+  -c --config FILE  Path to a configuration file (default: ~/.mackup.cfg)
   -f --force        Force every question asked to be answered with "Yes".
   -r --root         Allow mackup to be run as superuser.
   -n --dry-run      Show steps without executing.
   -v --verbose      Show additional details.
   --version         Show version.

 Modes of action:
  1. list: display a list of all supported applications.
  2. backup: sync your conf files to your synced storage, use this the 1st time
     you use Mackup.
  3. restore: link the conf files already in your synced storage on your system,
     use it on any new system you use.
  4. uninstall: reset everything as it was before using Mackup.

 By default, Mackup syncs all application data via
 Dropbox, but may be configured to exclude applications or use a different
-backend with a .mackup.cfg file.
+backend with a configuration file (see --config-file above)

 See https://github.com/lra/mackup/tree/master/doc for more information.
tpvasconcelos commented 2 years ago

Hey @lra I'm sure you're busy! Just checking if there's interest in this feature.

tpvasconcelos commented 1 month ago

Hey @lra! šŸš€ I'm still very much interested in this feature. Do you think this is something you'd like to have? I'm happy to work on a PR for you to review. It doesn't incur any backwards compatibility issues so I think it should not affect anyone and would also solve this previously closed issue: https://github.com/lra/mackup/issues/1624. Thanks in advance!