mirror of
https://github.com/kvz/bash3boilerplate.git
synced 2025-05-02 16:32:50 +00:00
better magic variables for current FILE & DIR
This commit is contained in:
parent
95f044d453
commit
b9dfc56e3c
4
main.sh
4
main.sh
@ -29,8 +29,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 "${0}")"; echo $(pwd))"
|
||||
__FILE__="${__DIR__}/$(basename "${0}")"
|
||||
|
||||
|
||||
### Functions
|
||||
|
Loading…
x
Reference in New Issue
Block a user