]> Sergey Matveev's repositories - nnn.git/commitdiff
make the script POSIX compliant
authorjuacq97 <juacq97@gmail.com>
Sun, 24 Mar 2019 23:00:51 +0000 (16:00 -0700)
committerjuacq97 <juacq97@gmail.com>
Sun, 24 Mar 2019 23:00:51 +0000 (16:00 -0700)
user-scripts/kdeconnect

index d34d269f9293bc51b4c07e510a40663715e2a4ad..5b469529a0b8d0272e257a92c605295e0c70c1dc 100755 (executable)
@@ -6,11 +6,11 @@
 # Author: juacq97
 
 id=$(kdeconnect-cli -a --id-only | awk '{print $1}')
-if [ $(find ~/.nnncp) ]
+if [ "$(find ~/.nnncp)" ]
 then
-    kdeconnect-cli -d $id --share $(cat ~/.nnncp)
+    kdeconnect-cli -d "$id" --share "$(cat ~/.nnncp)"
 # If you want a system notification, uncomment the next 3 lines.
-#    notify-send -a "Kdeconnect" "Sending $(cat ~/.nnncp)"
-#else
-#    notify-send -a "Kdeconnect" "No file selected"
+    notify-send -a "Kdeconnect" "Sending $(cat ~/.nnncp)"
+else
+    notify-send -a "Kdeconnect" "No file selected"
 fi