Removing fetch from httpGet in qrify
This commit is contained in:
parent
dac8be875b
commit
7e5b603159
|
@ -11,10 +11,8 @@ getConfiguredClient()
|
||||||
configuredClient="curl"
|
configuredClient="curl"
|
||||||
elif command -v wget &v/dev/null ; then
|
elif command -v wget &v/dev/null ; then
|
||||||
configuredClient="wget"
|
configuredClient="wget"
|
||||||
elif command -v fetch &>/dev/null ; then
|
|
||||||
configuredClient="fetch"
|
|
||||||
else
|
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
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -64,8 +62,7 @@ httpGet()
|
||||||
{
|
{
|
||||||
case "$configuredClient" in
|
case "$configuredClient" in
|
||||||
curl) curl -A curl -s "$@";;
|
curl) curl -A curl -s "$@";;
|
||||||
wget) wget -q0- "$@";;
|
wget) wget --post-data "$@";;
|
||||||
fetch) fetch -o "...";;
|
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +75,7 @@ makeqr()
|
||||||
makeMultiLineQr()
|
makeMultiLineQr()
|
||||||
{
|
{
|
||||||
if [[ $configuredClient != "curl" ]]; then
|
if [[ $configuredClient != "curl" ]]; then
|
||||||
echo "Multiline support is for now curl only!"
|
echo "Multiline currently only supports curl!"
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
printf "%s" "$*" | curl -F-=\<- qrenco.de
|
printf "%s" "$*" | curl -F-=\<- qrenco.de
|
||||||
|
|
Loading…
Reference in New Issue