[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: proposed BASH_SOURCE_PATH
From: |
Oğuz |
Subject: |
Re: proposed BASH_SOURCE_PATH |
Date: |
Thu, 20 Jun 2024 06:25:14 +0300 |
On Wednesday, June 19, 2024, Will Allan <billyzkid@yahoo.com> wrote:
> I think this is exactly why this feature is necessary. Unless I am
> misunderstanding, simply prepending `${BASH_SOURCE%/*}' to a sourced path
> will not work in all cases. For example, when executing the main script
> directly inside the script directory (e.g. `bash main.sh`) you would end up
> with an invalid path (e.g. main.sh/../lib/foo.sh).
>
What I'm saying there is name it main and execute like `./main'. I'm not
against having a variable that's automatically populated with the parent
directory of the source script, I just don't need it and it wasn't what we
were discussing.
--
Oğuz
Re: proposed BASH_SOURCE_PATH,
Oğuz <=
Re: proposed BASH_SOURCE_PATH, alex xmb sw ratchev, 2024/06/21