1
0
Fork 0

Use more robust method to get the scripts directory

This commit is contained in:
krcroft 2020-04-18 10:17:59 -07:00 committed by Patryk Obara
parent 5287559aee
commit 3301b5924e
2 changed files with 4 additions and 2 deletions

View file

@ -139,5 +139,6 @@ function parse_args() {
selected_type=$(lower "${selected_type}")
}
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# shellcheck source=scripts/automator/main.sh
source "$(dirname "$0")/automator/main.sh"
source "$script_dir/automator/main.sh"

View file

@ -53,5 +53,6 @@ function parse_args() {
# shellcheck disable=SC2034
data_dir="packages"
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# shellcheck source=scripts/automator/main.sh
source "$(dirname "$0")/automator/main.sh"
source "$script_dir/automator/main.sh"