From 197701b860dce7e3a7c56a6ac06f1bd90ec2203d Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 26 Jul 2024 16:11:21 +0200 Subject: [PATCH] ci/prepare-artifacts: use find's -exec instead of iterating over its output with xargs Also, split the `/ci/` part out to simplify the filename checks. Part-of: --- .gitlab-ci/prepare-artifacts.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci/prepare-artifacts.sh b/.gitlab-ci/prepare-artifacts.sh index 2709c03f988..29e9b841c6c 100755 --- a/.gitlab-ci/prepare-artifacts.sh +++ b/.gitlab-ci/prepare-artifacts.sh @@ -43,10 +43,14 @@ cp -Rp .gitlab-ci/setup-test-env.sh install/ cp -Rp .gitlab-ci/*-runner.sh install/ cp -Rp .gitlab-ci/bin/structured_logger.py install/ cp -Rp .gitlab-ci/bin/custom_logger.py install/ -find . -path \*/ci/\*.txt \ - -o -path \*/ci/\*.toml \ - -o -path \*/ci/\*traces\*.yml \ - | xargs -I '{}' cp -p '{}' install/ + +find src/ -path '*/ci/*' \ + \( \ + -name '*.txt' \ + -o -name '*.toml' \ + -o -name '*traces*.yml' \ + \) \ + -exec cp -p {} install/ \; # Tar up the install dir so that symlinks and hardlinks aren't each # packed separately in the zip file.