client: optimize/refactor repository path

- Reduces all calls into a single line
- Redefines path as root repository path
This commit is contained in:
2024-07-17 22:39:48 -07:00
parent cd9681566b
commit 7118a39f6d
7 changed files with 34 additions and 17 deletions

View File

@@ -21,7 +21,12 @@
# Implementation
#
source "$(dirname "$(realpath -s $0)")/src/docker/lib/lib_docker.bash" || exit 1
if [ -z "$DOCKER_FINANCE_CLIENT_REPO" ]; then
declare -gx DOCKER_FINANCE_CLIENT_REPO
DOCKER_FINANCE_CLIENT_REPO="$(dirname "$(realpath -s $0)" | rev | cut -d'/' -f2- | rev)"
fi
source "${DOCKER_FINANCE_CLIENT_REPO}/client/src/docker/lib/lib_docker.bash" || exit 1
#
# Execute