From 5b664cd00fce7968f1f64458246772777542b542 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Wed, 5 Dec 2018 22:08:49 +0100 Subject: [PATCH] ci_template: Don't use command substitution with find GNU find has operations like -exec and -delete that operate without the brittleness of applying shell word splitting to its output. In addition, it won't fail if no files were matched. --- gitlab/ci_template.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitlab/ci_template.yml b/gitlab/ci_template.yml index 61b094e377..380343ff30 100644 --- a/gitlab/ci_template.yml +++ b/gitlab/ci_template.yml @@ -44,7 +44,7 @@ gst indent: - indent --version || true - curl -o gst-indent https://gitlab.freedesktop.org/gstreamer/gstreamer/raw/master/tools/gst-indent - chmod +x gst-indent - - ./gst-indent $(find . -name "*.c") + - find . -name '*.c' -exec ./gst-indent {} + - | if [[ $(git diff) ]]; then git diff --color=always @@ -80,7 +80,7 @@ gst indent: after_script: - cd gst-build/ # Clean the artifacts packages to avoid copying "useless" build products. - - rm $(find build -name "*.o") $(find -name "*.a") + - test -d build && find build -name '*.[ao]' -delete # Clean the .git repos since we won't need them anymore - rm -rf subprojects/*/.git/ - rm -rf build/subprojects/*/.git/