Skip to content

Commit fb94815

Browse files
committed
fix: option entry not shifting past value
1 parent a263b18 commit fb94815

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

bin/_helpers

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ function output_error {
7373

7474
function output_info {
7575
output_tagged_string "$BG_B" "INFO" "$1"
76-
}
76+
}

bin/proxy

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ while :; do
6969
exit
7070
;;
7171
--local-domain|--local-port|--proxy-port|--proxy-domain)
72-
parsed_value=$(parse_arg $@)
72+
parsed_value=$(parse_arg "$@")
7373
;;
7474
--local-domain=?*|--local-port=?*|--proxy-port=?*|--proxy-domain=?*)
7575
parsed_value=$(parse_arg ${1%%=*} ${1#*=})
@@ -104,6 +104,9 @@ while :; do
104104
;;
105105
esac
106106

107+
if [ $1 == $option ]; then
108+
shift
109+
fi
107110
shift
108111
done
109112

@@ -146,7 +149,7 @@ function pick_one_virtual_host_from_file() {
146149
fi
147150
done
148151

149-
if [ -z "HOST" ]; then
152+
if [ -z "$HOST" ]; then
150153
output_error "No VIRTUAL_HOST found in $FILE."
151154
exit 1
152155
fi
@@ -221,4 +224,4 @@ output_info "Starting proxy... $FG_C${LOCAL_DOMAIN}$FG_N:$FG_M${LOCAL_PORT}$RESE
221224
echo
222225
output_tagged_string "$BG_N" "Proxy URL" "https://$PROXY_DOMAIN"
223226
echo
224-
ssh -tR ${PROXY_PORT}:${LOCAL_DOMAIN}:${LOCAL_PORT} [email protected] sirtunnel.py ${PROXY_DOMAIN} ${PROXY_PORT}
227+
#ssh -tR ${PROXY_PORT}:${LOCAL_DOMAIN}:${LOCAL_PORT} [email protected] sirtunnel.py ${PROXY_DOMAIN} ${PROXY_PORT}

0 commit comments

Comments
 (0)