File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change 11# shellcheck shell=bash
22
3- # TODO: autogen by basalt?
4-
3+ # TODO: autogen by basalt
54if [ -z " $BASALT_PACKAGE_PATH " ]; then
65 if [ " ${BASH_SOURCE[0]:: 1} " = / ]; then
7- BASALT_PACKAGE_PATH=" ${BASH_SOURCE[0]} "
8- elif command -v greadlink & > /dev/null; then
9- BASALT_PACKAGE_PATH=" $( greadlink -f " ${BASH_SOURCE[0]} " ) "
10- elif command -v realfile & > /dev/null; then
11- BASALT_PACKAGE_PATH=" $( realfile " ${BASH_SOURCE[0]} " ) "
12- elif command -v readlink & > /dev/null; then
13- BASALT_PACKAGE_PATH=" $( readlink -f " ${BASH_SOURCE[0]} " ) "
6+ BASALT_PACKAGE_PATH=" ${BASH_SOURCE[0]%/* } "
7+ else
8+ BASALT_PACKAGE_PATH=" $( CDPATH=; cd " ${BASH_SOURCE[0]%/* } " & > /dev/null; printf " $PWD " ) "
149 fi
15-
16- BASALT_PACKAGE_PATH=" ${BASALT_PACKAGE_PATH%/* } "
17- BASALT_PACKAGE_PATH=" ${BASALT_PACKAGE_PATH%/* } "
18- BASALT_PACKAGE_PATH=" ${BASALT_PACKAGE_PATH%/* } "
1910fi
2011
2112for f in " $BASALT_PACKAGE_PATH " /pkg/lib/{,source/,util/}?* .sh; do
You can’t perform that action at this time.
0 commit comments