Fix get_ip()
This commit is contained in:
parent
3cf5d8837f
commit
298b66ce6f
|
@ -33,9 +33,10 @@ doasedit() {
|
|||
|
||||
get_ip() {
|
||||
(( ${+commands[curl]} )) || return 2
|
||||
local ARGS=()
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
[[ $1 == --ip ]] && local IP="?ip=$2" && shift || local ARGS+=("$1")
|
||||
[[ $1 == --ip ]] && local IP="?ip=$2" && shift || ARGS+=("$1")
|
||||
shift
|
||||
done
|
||||
|
||||
|
@ -45,7 +46,6 @@ get_ip() {
|
|||
|
||||
http() {
|
||||
(( ${+commands[python]} )) || return 2
|
||||
|
||||
[[ $# -gt 0 ]] && local DIR="--directory=$1" && shift
|
||||
eval "python -m http.server 8080 --bind 127.0.0.1 $DIR $@"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue