Closed ThomasFeher closed 7 years ago
Hi Thomas, i agree that for using the same rc-file on several machines j4-make-config shouldn't store the full path. On the other hand this would require that you add the j4-make-config script to your PATH because otherwise something like source $HOME/.j4-make-config.rc would not work. And i wonder if this breaks the functionality for some people. Additionally, if you add host-specific configurations parts with -a, your rc file is different on several machines anyway.
What do you think?
You are probably right. I haven't used j4-make-config to add host-specific configurations yet. On the other hand it seems rather unusual to have full path stored in a config file, at least I haven't seen it before. It is ok for me to use my forked version for now. As soon as I need host-specific configurations, I will have to re-think my configuration scheme anyway.
The more I think about it, the more I like the idea of having several config.
I'm still undecided on this one. For me the best solution would be to store the exact command string which was used. But unfortunately sys.argv returns the expanded full path. I would go ahead and store just the name of the actual script in the config file but i don't want to break people's configurations. I think you should try out host-specific config files. This way, you can distribute a main configuration on several machines and still have host-specific configuration options, independent of the commandline stored in the configuration file.
Closing this for now.
In order to make the config file portable to different machines with different location where j4-make-config is installed, only the actual arguments should be stored in the configuration file.
This commit also cares about old style rc-files containing the j4-make-config command including its absolute path and deletes it properly.