diff options
author | EuAndreh <eu@euandre.org> | 2020-12-24 06:44:58 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-12-24 06:44:58 -0300 |
commit | 386201b1614624ecc7f6f85a5cb064b413ad67e4 (patch) | |
tree | 06139d352cb6f46a9ffc14239eb2a9476c79a663 | |
parent | Add torrent.html page with WebTorrent (diff) | |
download | euandre.org-386201b1614624ecc7f6f85a5cb064b413ad67e4.tar.gz euandre.org-386201b1614624ecc7f6f85a5cb064b413ad67e4.tar.xz |
Add sh helper to enable feature flags
-rw-r--r-- | default.nix | 11 |
1 files changed, 11 insertions, 0 deletions
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" '' |