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
|
||||
|
||||
# ===== 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[@]}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue