Removing fetch from httpGet in qrify

This commit is contained in:
Alex Epstein 2017-07-05 20:11:03 -04:00
parent dac8be875b
commit 7e5b603159
1 changed files with 3 additions and 6 deletions

View File

@ -11,10 +11,8 @@ getConfiguredClient()
configuredClient="curl"
elif command -v wget &v/dev/null ; then
configuredClient="wget"
elif command -v fetch &>/dev/null ; then
configuredClient="fetch"
else
echo "Error: This tool requires either curl, wget, or fetch to be installed." >&2
echo "Error: This tool requires either curl or wget to be installed." >&2
return 1
fi
}
@ -64,8 +62,7 @@ httpGet()
{
case "$configuredClient" in
curl) curl -A curl -s "$@";;
wget) wget -q0- "$@";;
fetch) fetch -o "...";;
wget) wget --post-data "$@";;
esac
}
@ -78,7 +75,7 @@ makeqr()
makeMultiLineQr()
{
if [[ $configuredClient != "curl" ]]; then
echo "Multiline support is for now curl only!"
echo "Multiline currently only supports curl!"
return 1
else
printf "%s" "$*" | curl -F-=\<- qrenco.de