whoops fixed call of which in module_confirm

master
David Kebler 2024-03-01 15:15:16 -08:00
parent 3a246c71cd
commit 184a0265c6
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ local DIR
local NAME local NAME
DIR=$1 DIR=$1
NAME=$2 NAME=$2
FILE="$(which find -L ${DIR} -type f -name "${NAME}.mod" -o -name "${NAME}".lib -o -name "${NAME}".func -o -name "${NAME}".sh -o -name "${NAME}".env)" FILE="$($(which find) -L ${DIR} -type f -name "${NAME}.mod" -o -name "${NAME}".lib -o -name "${NAME}".func -o -name "${NAME}".sh -o -name "${NAME}".env)"
COUNT=0 COUNT=0
if [ "$FILE" ]; then if [ "$FILE" ]; then
COUNT=$(echo $FILE | xargs -n 1 | wc -l) COUNT=$(echo $FILE | xargs -n 1 | wc -l)

View File

@ -13,7 +13,7 @@ NAME=$2
# TODO use file instead for valid extensions # TODO use file instead for valid extensions
# will look for valid module extensions and also look for duplicate modules with a directory which is not allowed # will look for valid module extensions and also look for duplicate modules with a directory which is not allowed
FILE="$(which find -L ${DIR} -type f -name "${NAME}.mod" -o -name "${NAME}".lib -o -name "${NAME}".func -o -name "${NAME}".sh -o -name "${NAME}".env)" FILE="$($(which find) -L ${DIR} -type f -name "${NAME}.mod" -o -name "${NAME}".lib -o -name "${NAME}".func -o -name "${NAME}".sh -o -name "${NAME}".env)"
# echo files found $FILE # echo files found $FILE
COUNT=0 COUNT=0
if [ "$FILE" ]; then if [ "$FILE" ]; then