[Slackbuilds-users] What if we `source`d the version number

Pierre-Philipp Braun pbraun at nethence.com
Mon Jan 10 17:34:20 UTC 2022

On 05/01/2022 08:11, Klaatu wrote:
> A quick fix, admittedly, but it occurred to me that it seemed non-optimized to
> have the same value in two places. Why not have it in one place instead? That
> way the human only has to interact with one file, instead of two, and anyway it
> "feels" like it's better design to have the value once, not twice.


that's a cool thread and I agree that duplicate information is painful 
to manage.  Here's a draft that would make both happy, maintainers and 
builders (KSH style, sorry, but easy enough to adapt):


[[ -z $VERSION ]] && . ./foo.info

That way, you can continue enforce VERSION from the command prompt when 
ever needed.

Pierre-Philipp Braun
SMTP Health Campaign: enforce STARTTLS and verify MX certificates

More information about the SlackBuilds-users mailing list