Changed find command to be able to search recursively properly.

This commit is contained in:
andrewc
2023-04-06 18:44:25 +10:00
parent a72975187e
commit c8f4ed1812

View File

@@ -26,27 +26,18 @@ image:
.commands:
get_files:
- |
if find **/*$SEARCH ; then
FILES=$(find **/*$SEARCH)
else
FILES=''
fi
- FILES=$(find . -name *$SEARCH)
get_dirs:
- FILES=$(find . -name *$SEARCH)
- |
if find **/*$SEARCH ; then
FILES=$(find **/*$SEARCH)
DIRS=$(dirname $FILES)
else
FILES=''
DIRS=''
fi
- ''
if [[ $FILES == "" ]]; then
DIRS=""
else
DIRS=$(dirname $FILES)
fi
sch_from_pro:
- 'SCHEMS=$(for f in $FILES ; do echo "${f%.*}.kicad_sch"; done)'
- 'SCHEMS=$(for f in $SCHEMS ; do echo "${f##**/}"; done)'
get_names:
- 'NAMES=$(for f in $FILES ; do echo "${**/f%$SEARCH}"; done)'
dir_arr:
- !reference [.commands, get_dirs]
- END=$(wc -w <<< $DIRS)
@@ -148,5 +139,4 @@ outputs_all:
- cd $CI_PROJECT_DIR
- !reference [.commands, kibot]
- cd $CI_PROJECT_DIR
- ls Fabrication/interface
- !reference [.commands, neo]