minor hygiene improvements to ./host script
This commit is contained in:
parent
16a54d07a7
commit
1d8c87df59
1 changed files with 17 additions and 5 deletions
20
host
20
host
|
|
@ -1,6 +1,18 @@
|
||||||
#!/usr/bin/env nix-shell
|
#!/usr/bin/env bash
|
||||||
#! nix-shell -i bash --pure
|
|
||||||
#! nix-shell -p bash simple-http-server
|
# ===== Configuration ===== #
|
||||||
|
NOCACHE=true
|
||||||
|
SRV_ARGS=""
|
||||||
|
# ========================= #
|
||||||
|
|
||||||
|
function hostwww (
|
||||||
|
local ARGS="$SRV_ARGS"
|
||||||
|
if [[ "$NOCACHE" == true ]]; then
|
||||||
|
ARGS+=" --nocache"
|
||||||
|
fi
|
||||||
|
|
||||||
cd www
|
cd www
|
||||||
simple-http-server --nocache
|
simple-http-server "$ARGS" "$@"
|
||||||
|
)
|
||||||
|
|
||||||
|
hostwww
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue