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 1
1
# shellcheck shell=bash
2
2
3
- # TODO: autogen by basalt?
4
-
3
+ # TODO: autogen by basalt
5
4
if [ -z " $BASALT_PACKAGE_PATH " ]; then
6
5
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 " ) "
14
9
fi
15
-
16
- BASALT_PACKAGE_PATH=" ${BASALT_PACKAGE_PATH%/* } "
17
- BASALT_PACKAGE_PATH=" ${BASALT_PACKAGE_PATH%/* } "
18
- BASALT_PACKAGE_PATH=" ${BASALT_PACKAGE_PATH%/* } "
19
10
fi
20
11
21
12
for f in " $BASALT_PACKAGE_PATH " /pkg/lib/{,source/,util/}?* .sh; do
You can’t perform that action at this time.
0 commit comments