Use more robust method to get the scripts directory
This commit is contained in:
parent
5287559aee
commit
3301b5924e
2 changed files with 4 additions and 2 deletions
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue