diff --git a/qrify/qrify b/qrify/qrify index 6b71c3a..1bcd753 100755 --- a/qrify/qrify +++ b/qrify/qrify @@ -87,9 +87,18 @@ makeqr() # redirects the image obtained from the goqr api into a png file function makeQRFile { input=$(echo "$input" | sed -e s/" "/%20/g -e s/'\\n'/%0A/g ) ##same as in the makeqr function - httpGet "api.qrserver.com/v1/create-qr-code/?size=150x150&data=$input" > $fileName.png + + addFileExt + + httpGet "api.qrserver.com/v1/create-qr-code/?size=150x150&data=$input" > $fileName } +function addFileExt { + if ! echo "$fileName" | grep -E -q ".*\.png$|.*\.PNG$" + then + fileName="$fileName.png" + fi +} makeMultiLineQr() { diff --git a/qrify/qrify.png b/qrify/qrify.png deleted file mode 100644 index b659b2c..0000000 Binary files a/qrify/qrify.png and /dev/null differ