Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions betterspeedtest.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,16 @@ PINGHOST="gstatic.com"
MAXSESSIONS="5"
TESTPROTO="-4"

# normalize the options
# read the options
set -- $(getopt -s sh -u -n 'betterspeedtest.sh' -l 'host:' -l 'time:' -l 'ping:' -l 'number:' '46H:t:p:n:' "${@}")

# exit if `getopt` fails and pass through exit code
EXIT=$?
if [ $EXIT != 0 ]
then
exit $EXIT
fi

# extract options and their arguments into variables.
while [ $# -gt 0 ]; do
Expand Down