fix bash mistakes
This commit is contained in:
parent
a27d153d21
commit
ecec515114
1 changed files with 4 additions and 4 deletions
8
serve
8
serve
|
|
@ -4,7 +4,7 @@
|
||||||
# | sass
|
# | sass
|
||||||
|
|
||||||
# ===== Configuration ===== #
|
# ===== Configuration ===== #
|
||||||
ADDR="127.0.01" # bind address
|
ADDR="127.0.0.1" # bind address
|
||||||
PORT="8000" # bind port
|
PORT="8000" # bind port
|
||||||
WEBROOT="www" # root web directory
|
WEBROOT="www" # root web directory
|
||||||
USE_INDEX=true
|
USE_INDEX=true
|
||||||
|
|
@ -32,7 +32,7 @@ function watch_scss {
|
||||||
}
|
}
|
||||||
|
|
||||||
function host {
|
function host {
|
||||||
local args=$@
|
local args=( "$@" )
|
||||||
# Apply Flags
|
# Apply Flags
|
||||||
if [[ "$NO_CACHE" == true ]]; then
|
if [[ "$NO_CACHE" == true ]]; then
|
||||||
args+=("--nocache")
|
args+=("--nocache")
|
||||||
|
|
@ -44,7 +44,7 @@ function host {
|
||||||
# Apply Options
|
# Apply Options
|
||||||
args+=(--ip "$ADDR" --port "$PORT")
|
args+=(--ip "$ADDR" --port "$PORT")
|
||||||
|
|
||||||
simple-http-server $args $@ -- "$WEBROOT"
|
simple-http-server "${args[@]}" "$@" -- "$WEBROOT"
|
||||||
}
|
}
|
||||||
|
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
|
@ -56,4 +56,4 @@ watch_scss &
|
||||||
SASS_PID=$!
|
SASS_PID=$!
|
||||||
|
|
||||||
# host dev server
|
# host dev server
|
||||||
host ${SRV_ARGS[@]}
|
host "${SRV_ARGS[@]}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue