[gnome-shell/wip/fmuellner/update-js-ci: 1/4] ci: Make install-meson-project's PREPARE arg optional




commit 3093f5329a36c1c3cd7c4cfc36ed174b6ca3bd13
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Feb 17 23:24:54 2022 +0100

    ci: Make install-meson-project's PREPARE arg optional
    
    It covers a very special case that is unlikely to be needed by
    any other projects that are added to the build.
    
    Rather than forcing callers to pass something like /usr/bin/true,
    make the argument optional.

 .gitlab-ci/install-meson-project.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci/install-meson-project.sh b/.gitlab-ci/install-meson-project.sh
index 8aacfdd77d..ecbbc7b0c8 100755
--- a/.gitlab-ci/install-meson-project.sh
+++ b/.gitlab-ci/install-meson-project.sh
@@ -2,7 +2,7 @@
 
 set -e
 
-if [[ $# -lt 4 ]]; then
+if [[ $# -lt 3 ]]; then
   echo Usage: $0 [options] [repo-url] [commit] [subdir]
   echo  Options:
   echo    -Dkey=val
@@ -26,7 +26,7 @@ REPO_DIR="$(basename ${REPO_URL%.git})"
 git clone --depth 1 "$REPO_URL" -b "$COMMIT"
 pushd "$REPO_DIR"
 pushd "$SUBDIR"
-sh -c "$PREPARE"
+[ "$PREPARE" ] && sh -c "$PREPARE"
 meson --prefix=/usr _build "${MESON_OPTIONS[@]}"
 meson install -C _build
 popd


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]