Skip to content

Commit

Permalink
fix: option entry not shifting past value
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasonej committed Oct 18, 2024
1 parent a263b18 commit fb94815
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/_helpers
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ function output_error {

function output_info {
output_tagged_string "$BG_B" "INFO" "$1"
}
}
9 changes: 6 additions & 3 deletions bin/proxy
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ while :; do
exit
;;
--local-domain|--local-port|--proxy-port|--proxy-domain)
parsed_value=$(parse_arg $@)
parsed_value=$(parse_arg "$@")
;;
--local-domain=?*|--local-port=?*|--proxy-port=?*|--proxy-domain=?*)
parsed_value=$(parse_arg ${1%%=*} ${1#*=})
Expand Down Expand Up @@ -104,6 +104,9 @@ while :; do
;;
esac

if [ $1 == $option ]; then
shift
fi
shift
done

Expand Down Expand Up @@ -146,7 +149,7 @@ function pick_one_virtual_host_from_file() {
fi
done

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

0 comments on commit fb94815

Please sign in to comment.