whoops fixed call of which in module_confirm
parent
3a246c71cd
commit
184a0265c6
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue