X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=blobdiff_plain;f=scripts%2Fcore%2Ffunctions.sh;fp=scripts%2Fcore%2Ffunctions.sh;h=207a384f90ab134df4617f3603d612bc1e073801;hp=c1a14c0e83d594258a7f06e12eb6798ad17f8c1e;hb=8904b69b65943f04f5aeca6e10c44fd7cf78303c;hpb=c47393ee17878881ca2947bc21fcf6c4c021d4cd diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index c1a14c0e..207a384f 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -40,11 +40,19 @@ if [ -z "$skip_all" ]; then { to_find="$1"; shift local WHICHER="$(\which which 2>/dev/null)" +#>&2 echo "got whicher as: $WHICHER" if [ $? -ne 0 ]; then # there is no which command here. we produce nothing due to this. echo + return 2 fi - echo $($WHICHER $to_find 2>/dev/null) + local sporkenz # must be defined local here, before call, or we don't get exit value?! + sporkenz=$($WHICHER "$to_find" 2>/dev/null) +#>&2 echo "broken with this line, but here is exit val: $?" + local err=$? +#>&2 echo "got whicher as: $WHICHER" + echo $sporkenz + return $err } # makes a directory of the name specified and then tries to change the