From 496cda903b1ef9805f839158a9d6da4c20b5f05f Mon Sep 17 00:00:00 2001 From: Parham Alvani Date: Fri, 4 Aug 2023 16:33:41 -0400 Subject: [PATCH] Squashed 'scripts/lib/' changes from f9c94fce..09dcc439 09dcc439 fix: correct issue with calling dependencies and additionals git-subtree-dir: scripts/lib git-subtree-split: 09dcc439129bb3a6c058c27227e1dbcfcc1d2e7f --- start.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/start.sh b/start.sh index 525f80ae1..60d32416b 100755 --- a/start.sh +++ b/start.sh @@ -7,6 +7,7 @@ set -o pipefail # a global variable that points to dotfiles root directory. # it used also in scripts/. root="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +main_root="$root" # shellcheck source=message.sh source "$root/scripts/lib/message.sh" # shellcheck source=proxy.sh @@ -180,9 +181,6 @@ _run() { } _additionals() { - local start_home - start_home="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - declare -a additionals additionals=("$@") @@ -203,15 +201,12 @@ _additionals() { options="${options}y" fi - "$start_home/start.sh" "$options" "${additional[@]}" + "$main_root/start.sh" "$options" "${additional[@]}" fi done } _dependencies() { - local start_home - start_home="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - declare -a dependencies dependencies=("$@") @@ -231,7 +226,7 @@ _dependencies() { for dependency in "${dependencies[@]}"; do read -ra dependency <<<"$dependency" - "$start_home/start.sh" "$options" "${dependency[@]}" + "$main_root/start.sh" "$options" "${dependency[@]}" done fi }