Automatic commit with j

This commit is contained in:
Thomas Levine 2016-02-26 18:16:24 +00:00
parent 5aba84246f
commit e7d5a35409

37
urchin
View File

@ -16,13 +16,6 @@ unset CDPATH
# Urchin version number # Urchin version number
VERSION=0.0.6 VERSION=0.0.6
fullpath() {
(
cd -- "$1"
pwd
)
}
indent() { indent() {
level="$1" level="$1"
if test "$level" -gt 0; then if test "$level" -gt 0; then
@ -96,7 +89,8 @@ recurse() {
then then
TEST_SHELL="$TEST_SHELL" "$shell_for_sh_tests" ./"$potential_test" > "$stdout_file" 2>&1 TEST_SHELL="$TEST_SHELL" "$shell_for_sh_tests" ./"$potential_test" > "$stdout_file" 2>&1
else else
TEST_SHELL="$TEST_SHELL" ./"$potential_test" > "$stdout_file" 2>&1 dotslash=$(echo "$potential_test" | grep '^/' > /dev/null || echo ./)
TEST_SHELL="$TEST_SHELL" $dotslash"$potential_test" > "$stdout_file" 2>&1
fi fi
exit_code="$?" exit_code="$?"
@ -298,22 +292,19 @@ do
shift shift
done done
# Verify argument for main stuff
if [ "$#" != '1' ] || [ ! -d "$1" ]
then
[ -n "$1" ] && [ ! -d "$1" ] && echo "Not a directory: '$1'" >&2
echo "$USAGE" >&2
exit 11
fi
# Constants
logfile=$(fullpath "$1")/.urchin.log
stdout_file=$(fullpath "$1")/.urchin_stdout
# Run or present the Molly guard. # Run or present the Molly guard.
if fullpath "$1" | grep -Fi 'test' > /dev/null || $force thetest=$(readlink -f "$1")
then if echo "$thetest" | grep -Fi 'test' > /dev/null || $force; then
urchin_go "$1" "$shell_for_sh_tests" if test -d "$1"; then
logfile="$thetest/.urchin.log"
stdout_file="$thetest/.urchin_stdout"
else
d=$(echo "$thetest" | sed 's/\/[^\/]\{1,\}$//')
logfile="$d/.urchin.log"
stdout_file="$d/.urchin_stdout"
cd "$d"
fi
urchin_go "$thetest" "$shell_for_sh_tests"
else else
urchin_molly_guard urchin_molly_guard
fi fi