From c8f4ed18124bc3ec2981ca41f2624c4c8572066d Mon Sep 17 00:00:00 2001 From: andrewc Date: Thu, 6 Apr 2023 18:44:25 +1000 Subject: [PATCH] Changed find command to be able to search recursively properly. --- .gitlab-ci.yml | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5bf839b..e03dfec 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,27 +26,18 @@ image: .commands: get_files: - - | - if find **/*$SEARCH ; then - FILES=$(find **/*$SEARCH) - else - FILES='' - fi + - FILES=$(find . -name *$SEARCH) get_dirs: - - | - if find **/*$SEARCH ; then - FILES=$(find **/*$SEARCH) - DIRS=$(dirname $FILES) - else - FILES='' - DIRS='' - fi - - '' + - FILES=$(find . -name *$SEARCH) + - | + 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]