diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-01-17 15:12:29 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-01-17 15:13:13 +0000 |
commit | 8b239acb7f710492b41aaec943262e6aaddb37c0 (patch) | |
tree | 4c47407e989becbda30f3a7a438e374c4cb45863 | |
parent | 95fba8ac6c872c2ba5e2ea8be5da9f2eb63374c8 (diff) | |
download | spectrum-8b239acb7f710492b41aaec943262e6aaddb37c0.tar spectrum-8b239acb7f710492b41aaec943262e6aaddb37c0.tar.gz spectrum-8b239acb7f710492b41aaec943262e6aaddb37c0.tar.bz2 spectrum-8b239acb7f710492b41aaec943262e6aaddb37c0.tar.lz spectrum-8b239acb7f710492b41aaec943262e6aaddb37c0.tar.xz spectrum-8b239acb7f710492b41aaec943262e6aaddb37c0.tar.zst spectrum-8b239acb7f710492b41aaec943262e6aaddb37c0.zip |
Documentation/scripts/build.sh: avoid unquoted var
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 <hi@alyssa.is>
-rw-r--r-- | Documentation/default.nix | 2 | ||||
-rwxr-xr-x | Documentation/scripts/build.sh | 4 |
2 files changed, 3 insertions, 3 deletions
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 "$@" |