lra / mackup

Keep your application settings in sync (OS X/Linux)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to use environment variables within `mackup.cfg`?

noraworld opened this issue · comments

I would like to use environment variables within mackup.cfg, but I don't know how to achieve this. The example of the usage is something like this:

[storage]
engine = file_system
path = workspace/mackup
directory = $OSTYPE

I want to separate directories by OSs.

I read #618, but I think this only mentions about XDG.

I don't believe this is supported at this time. I recommend using a different ~/.mackup.cfg file for each computer. Just be careful when running the mackup restore command and make sure you don't overwrite your local ~/.mackup.cfg.

Hope that helps.

@joshmedeski Thank you for your reply.

Then I will use it by separating files by each OSs for now. But I think it is more useful for us to be able to use environment variables or other alternatives. Is there a plan to implement this?

Issues have been brought up multiple times over the year. If someone wants to create a proposal that keeps mackup simple, we are open to it.

The main concern is creating a solution that makes mackup less beginner-friendly or complicates the setup.

I see. Unfortunately, I don't have enough time and knowledge about it, but I will be waiting for a new solution coming.

Thank you for letting me know. 🙏

You can maybe workaround this by adding links to the same folder on different OSes?

commented

I have a similar need

For example, I want to overwrite the zsh configuration, and I want to back up my newly added zsh shell using mackup

The file looks like this:

image