From 1d8c87df593e733d04d9c674866580c31af1c551 Mon Sep 17 00:00:00 2001 From: Emile Clark-Boman Date: Mon, 28 Jul 2025 23:15:30 +1000 Subject: [PATCH] minor hygiene improvements to ./host script --- host | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/host b/host index 2c1932d..5097a9f 100755 --- a/host +++ b/host @@ -1,6 +1,18 @@ -#!/usr/bin/env nix-shell -#! nix-shell -i bash --pure -#! nix-shell -p bash simple-http-server +#!/usr/bin/env bash -cd www -simple-http-server --nocache +# ===== Configuration ===== # +NOCACHE=true +SRV_ARGS="" +# ========================= # + +function hostwww ( + local ARGS="$SRV_ARGS" + if [[ "$NOCACHE" == true ]]; then + ARGS+=" --nocache" + fi + + cd www + simple-http-server "$ARGS" "$@" +) + +hostwww