minor hygiene improvements to ./host script

This commit is contained in:
Emile Clark-Boman 2025-07-28 23:15:30 +10:00
parent 16a54d07a7
commit 1d8c87df59

22
host
View file

@ -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