simpler urchin root
This commit is contained in:
parent
83af249dcd
commit
c9af70b947
6
tests/Test root contains .urchin./.meta-assess
Executable file
6
tests/Test root contains .urchin./.meta-assess
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
observed=$(../../urchin "$1" .testsuite/a/b)
|
||||
expected=.testsuite/a/b/../..
|
||||
|
||||
test "$observed" = "$expected"
|
@ -1,6 +1,2 @@
|
||||
#!/bin/sh
|
||||
|
||||
observed=$(../../urchin --root .testsuite/a/b)
|
||||
expected=.testsuite/a/b/../..
|
||||
|
||||
test "$observed" = "$expected"
|
||||
./.meta-assess --root
|
||||
|
2
tests/Test root contains .urchin./Assess root with -r.
Executable file
2
tests/Test root contains .urchin./Assess root with -r.
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
./.meta-assess -r
|
4
urchin
4
urchin
@ -22,8 +22,7 @@ urchin_root() {
|
||||
if test -f "$1"; then
|
||||
set -- $(dirname "$1")
|
||||
fi
|
||||
cd "$1"
|
||||
if test -d .urchin; then
|
||||
if test -d "$1"/.urchin; then
|
||||
echo "$1"
|
||||
elif test "$(readlink -f $1)" = /; then
|
||||
guess=$(readlink -f "$1"|sed s+\(/tests?/\).*+/tests/+)
|
||||
@ -33,7 +32,6 @@ maybe like this:
|
||||
mkdir '$guess'/.urchin
|
||||
" >&2
|
||||
else
|
||||
cd - > /dev/null
|
||||
urchin_root "$1"/..
|
||||
fi
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user