Automatic commit with j

This commit is contained in:
Thomas Levine 2016-02-27 18:26:14 +00:00
parent a4a0aabbef
commit e07b340906

13
urchin
View File

@ -32,11 +32,8 @@ urchin_root() {
urchin_root "$(dirname "$current")" "$orig" urchin_root "$(dirname "$current")" "$orig"
elif test -d "$current"/.urchin; then elif test -d "$current"/.urchin; then
remove_trailing_slash "$current" remove_trailing_slash "$current"
elif test "$(readlink -f "$current")" = / || elif test "$(readlink -f "$current")" = /; then
{ echo "$current" | grep '^\.' && # Stop traversing upwards at /
test "$current" != . && test "$current" != ..
} > /dev/null; then
# Stop traversing upwards at / and at hidden directories.
if test -d "$orig"; then if test -d "$orig"; then
origdir="$orig" origdir="$orig"
else else
@ -45,9 +42,13 @@ urchin_root() {
echo "You need to create the .urchin directory in the root of your tests, echo "You need to create the .urchin directory in the root of your tests,
maybe like this: maybe like this:
mkdir '$(remove_trailing_slash "$origdir")/.urchin' mkdir '$(readlink -f "$(remove_trailing_slash "$origdir")")/.urchin'
" >&2 " >&2
return 1 return 1
elif test "$current" != . && test "$current" != .. &&
echo "$current" | grep '^\.' && > /dev/null; then
# Stop traversing upwards at hidden directories.
urchin_root / "$orig"
else else
urchin_root "$current"/.. "$orig" urchin_root "$current"/.. "$orig"
fi fi