From 8b239acb7f710492b41aaec943262e6aaddb37c0 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 17 Jan 2023 15:12:29 +0000 Subject: Documentation/scripts/build.sh: avoid unquoted var MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Recent versions of shellcheck warn about word splitting on JEKYLLFLAGS. To avoid this, let's switch to using "$@" to store the Jekyll command line we're building up. This also gives us a consistent way to pass extra arguments to Jekyll. They just need to be specified on the command line — we can remove special handling for the destination by just having the caller pass -d like they would when dealing with Jekyll directly. Signed-off-by: Alyssa Ross --- Documentation/default.nix | 2 +- Documentation/scripts/build.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Documentation') diff --git a/Documentation/default.nix b/Documentation/default.nix index 9edfbe8..564a476 100644 --- a/Documentation/default.nix +++ b/Documentation/default.nix @@ -20,7 +20,7 @@ stdenvNoCC.mkDerivation { buildPhase = '' runHook preBuild - scripts/build.sh $out + scripts/build.sh -d $out runHook postBuild ''; diff --git a/Documentation/scripts/build.sh b/Documentation/scripts/build.sh index e6a2cd8..5c132e3 100755 --- a/Documentation/scripts/build.sh +++ b/Documentation/scripts/build.sh @@ -5,10 +5,10 @@ cd "$(dirname "$0")/.." if [ ! -w . ] && [ ! -w .jekyll-cache ]; then - JEKYLLFLAGS=--disable-disk-cache + set -- --disable-disk-cache "$@" fi find . '(' '!' -path ./_site -o -prune ')' \ -a -name '*.drawio' \ -exec drawio -xf svg '{}' ';' -jekyll build $JEKYLLFLAGS -b /doc -d "${1:-_site}" +jekyll build -b /doc "$@" -- cgit 1.4.1