Small fix to pass shellcheck
authorEinar Jørgen Haraldseid <einar@haraldseid.net>
Sat, 27 May 2017 10:36:44 +0000 (12:36 +0200)
committerEinar Jørgen Haraldseid <einar@haraldseid.net>
Sat, 27 May 2017 10:36:44 +0000 (12:36 +0200)
screenshot.sh

index ec1931b80ee1db39c262f5d64d7636960fc74521..e3b0037baf5ae7dacd71e726f91655b98acf76bd 100755 (executable)
@@ -22,7 +22,7 @@ function take_screenshot() {
   FileName="$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 6 | head -n 1).png"
   if [ "$@" = "clipboard" ]; then
     xclip -out -selection clipboard -t image/png > "/tmp/${FileName}" 2>/dev/null
-    if [ "$(file -b --mime-type /tmp/${FileName})" == "image/png" ]; then
+    if [ "$(file -b --mime-type "/tmp/${FileName}")" == "image/png" ]; then
       mv "/tmp/${FileName}" "${LocalPath}/"
     else
       rm "/tmp/${FileName}"