help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bash Library


From: Greg Wooledge
Subject: Re: Bash Library
Date: Wed, 21 Apr 2021 17:43:13 -0400

On Wed, Apr 21, 2021 at 11:34:20PM +0200, steve-humphreys@gmx.com wrote:
> In summary, one has to include the path to "lantern.sh" to set the other
> parts.
> 
> source ~/Admir/build/decun/lantern.sh
> 
> The problem I want to discuss is the situation when other users install
> the library in some other path.  They would have to change the hardwired
> path "~/Admir/build/decun/lantern.sh".  This means that they cannot
> simply run my scripts by calling "test.sh".  What is the least cumbersome
> way to deal with this?

The path ~/Admir/build/decun/ is obviously unique to your development
setup, and should not appear in a finished script that you expect other
people to be using.

If you expect people to deploy this within their home directories, you
should decide on a location within $HOME that would make sense for
most of your users to converge on.  $HOME/bin/lantern.sh would not be
a terrible choice.  You could use that, or something similar.

Then, copy or symlink lantern.sh to that location on your own system so
that your testing will pick it up.  Change all references to it within
the script(s) that you're writing to the new standard location.  Document
the standard location in the installation instructions that you give
to your users.

Any user who doesn't like this location is free to modify the scripts
themselves, or create a symlink from the standard location to wherever
they decide to put it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]