File tree Expand file tree Collapse file tree 6 files changed +31
-88
lines changed Expand file tree Collapse file tree 6 files changed +31
-88
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ # shellcheck shell=bash
2+
3+ bobject-print () {
4+ # TODO
5+ :
6+ }
Original file line number Diff line number Diff line change 11# shellcheck shell=bash
22
3- for f in " $BASH_OBJECT_LIB_DIR " /{,util/}?* .sh; do
4- source " $f "
5- done
6-
73bobject () {
84 local subcmd=" $1 "
95 shift
Original file line number Diff line number Diff line change 1+ # shellcheck shell=bash
2+
3+ # TODO: autogen by basalt?
4+
5+ if [ -z " $BASALT_PACKAGE_PATH " ]; then
6+ 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]} " ) "
14+ fi
15+
16+ BASALT_PACKAGE_PATH=" ${BASALT_PACKAGE_PATH%/* } "
17+ BASALT_PACKAGE_PATH=" ${BASALT_PACKAGE_PATH%/* } "
18+ fi
19+
20+ for f in " $BASALT_PACKAGE_PATH " /pkg/lib/{,source/,util/}?* .sh; do
21+ source " $f "
22+ done
Original file line number Diff line number Diff line change 11# shellcheck shell=bash
22
3+ # TODO: test for -u and -o pipefail
34set -e
45
5- # TODO: only do once
6- eval " $( basalt global init bash) "
7-
6+ load ' ../pkg/load.bash'
87load ' ./util/test_util.sh'
98
9+ eval " $( basalt global init bash) "
1010basalt-load ' github.com/ztombol/bats-support'
1111basalt-load ' github.com/ztombol/bats-assert'
1212
13- # TODO
14- ROOT_DIR=" $( realpath " ${BASH_SOURCE[0]} " ) "
15- ROOT_DIR=" ${ROOT_DIR%/* } " ; ROOT_DIR=" ${ROOT_DIR%/* } " ; ROOT_DIR=" ${ROOT_DIR%/* } "
16-
17- export PATH=" $ROOT_DIR /pkg/bin:$PATH "
18- for f in " $ROOT_DIR " /pkg/lib/{,util}/?* .sh; do
19- # shellcheck disable=SC1090
20- source " $f "
21- done
22- source ' bobject'
23-
2413setup () {
2514 cd " $BATS_TEST_TMPDIR "
2615}
You can’t perform that action at this time.
0 commit comments