Skip to content

Commit

Permalink
Squashed 'scripts/lib/' changes from f9c94fce..09dcc439
Browse files Browse the repository at this point in the history
09dcc439 fix: correct issue with calling dependencies and additionals

git-subtree-dir: scripts/lib
git-subtree-split: 09dcc439129bb3a6c058c27227e1dbcfcc1d2e7f
  • Loading branch information
1995parham committed Aug 4, 2023
1 parent 5d7ddfd commit 496cda9
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -180,9 +181,6 @@ _run() {
}

_additionals() {
local start_home
start_home="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

declare -a additionals
additionals=("$@")

Expand All @@ -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=("$@")

Expand All @@ -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
}
Expand Down

0 comments on commit 496cda9

Please sign in to comment.