fix for imgur shell-script

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
zen@devel:/tmp$ diff -u orig.sh 1.sh
--- orig.sh 2014-10-11 17:58:21.639104004 +0300
+++ 1.sh 2014-10-11 18:09:01.746278133 +0300
@@ -103,8 +103,8 @@
# put the URLs on the clipboard if we have xsel or xclip
if [ $DISPLAY ]; then
- { type xsel >/dev/null 2>/dev/null && echo -n $clip | xsel; } \
- || { type xclip >/dev/null 2>/dev/null && echo -n $clip | xclip; } \
+ { type xsel >/dev/null 2>/dev/null && echo -n $clip | xsel -b; } \
+ || { type xclip >/dev/null 2>/dev/null && echo -n $clip | xclip -selection clipboard; } \
|| echo "Haven't copied to the clipboard: no xsel or xclip" >&2
else
echo "Haven't copied to the clipboard: no \$DISPLAY" >&2