diff --git a/main.sh b/main.sh index 7933789..5753fa7 100755 --- a/main.sh +++ b/main.sh @@ -37,8 +37,8 @@ read -r -d '' usage <<-'EOF' EOF # Set magic variables for current FILE & DIR -__FILE__="$(test -L "$0" && readlink "$0" || echo "$0")" -__DIR__="$(cd "$(dirname "${__FILE__}")"; echo $(pwd);)" +__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +__file="${__dir}/$(basename "${0}")" ### Functions