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