parameter expansions
This commit is contained in:
parent
287fd8a37c
commit
446353a6a7
5
urchin
5
urchin
|
@ -272,9 +272,10 @@ remove_trailing_slash() {
|
||||||
echo "$1" | sed s/\\/$//
|
echo "$1" | sed s/\\/$//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Find the root directory of the present test suite
|
||||||
urchin_root() {
|
urchin_root() {
|
||||||
# Call recursively but remember the original argument.
|
# Call recursively but remember the original argument.
|
||||||
current="$(remove_trailing_slash "${1}")"
|
current="${1%/}"
|
||||||
if test -n "${2}"; then
|
if test -n "${2}"; then
|
||||||
orig="${2}"
|
orig="${2}"
|
||||||
else
|
else
|
||||||
|
@ -296,7 +297,7 @@ urchin_root() {
|
||||||
elif test -f "${current}"; then
|
elif test -f "${current}"; then
|
||||||
urchin_root "$(dirname -- "${current}")" "${orig}"
|
urchin_root "$(dirname -- "${current}")" "${orig}"
|
||||||
elif test -f "${current}"/.urchin_root; then
|
elif test -f "${current}"/.urchin_root; then
|
||||||
remove_trailing_slash "${current}"
|
echo "${current}"
|
||||||
else
|
else
|
||||||
urchin_root "${current}"/.. "${orig}"
|
urchin_root "${current}"/.. "${orig}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user