fix bash mistakes

This commit is contained in:
Emile Clark-Boman 2026-01-31 09:26:27 +10:00
parent a27d153d21
commit ecec515114

8
serve
View file

@ -4,7 +4,7 @@
# | sass
# ===== Configuration ===== #
ADDR="127.0.01" # bind address
ADDR="127.0.0.1" # bind address
PORT="8000" # bind port
WEBROOT="www" # root web directory
USE_INDEX=true
@ -32,7 +32,7 @@ function watch_scss {
}
function host {
local args=$@
local args=( "$@" )
# Apply Flags
if [[ "$NO_CACHE" == true ]]; then
args+=("--nocache")
@ -44,7 +44,7 @@ function host {
# Apply Options
args+=(--ip "$ADDR" --port "$PORT")
simple-http-server $args $@ -- "$WEBROOT"
simple-http-server "${args[@]}" "$@" -- "$WEBROOT"
}
trap cleanup EXIT
@ -56,4 +56,4 @@ watch_scss &
SASS_PID=$!
# host dev server
host ${SRV_ARGS[@]}
host "${SRV_ARGS[@]}"