[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bash Library
From: |
steve-humphreys |
Subject: |
Bash Library |
Date: |
Wed, 21 Apr 2021 23:34:20 +0200 |
I have a bash library with some directories (fractr and telemtrk) and want
to call some of the functions defined there.
libpath: ~/Admir/build/decun/
frcpath: $libpath/fractr
trkpath: $libpath/telemtrk
There are a few tests in directory telemtrk, where the relevant paths can
be set by calling "config-path" provided by "lantern.sh".
--- test.sh ---
source ~/Admir/build/decun/lantern.sh
dcnpath=$(config-path decuneus)
frcpath=$(config-path fractr)
--- test.sh ---
When making my own bash scripts, I want to use the tools provided by the
library. This entails using "config-path" in "lantern.sh".
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?
- Bash Library,
steve-humphreys <=