From 386201b1614624ecc7f6f85a5cb064b413ad67e4 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 24 Dec 2020 06:44:58 -0300 Subject: Add sh helper to enable feature flags --- default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/default.nix b/default.nix index 801c50d..2640e08 100644 --- a/default.nix +++ b/default.nix @@ -63,6 +63,17 @@ in rec { shellHook = '' echo 'Starting a live server with:' echo ' jekyll serve --future --livereload --trace' + echo 'Server with feature flags:' + echo ' jekyll serve --future --livereload --trace -c $(cfg torrent podcast)' + + cfg() { + T="$(mktemp --suffix .yml)" + cp _config.yml "$T" + for flag in "$@"; do + printf '\n%s: true\n' "$flag" >> "$T" + done + echo "$T" + } ''; }; publishScript = pkgs.writeShellScriptBin "publish.sh" '' -- cgit v1.2.3