minor hygiene improvements to ./host script
This commit is contained in:
parent
16a54d07a7
commit
1d8c87df59
1 changed files with 17 additions and 5 deletions
22
host
22
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue