Merge commit 'holizz/whitespace' into experimental
authorDieter Plaetinck <dieter@plaetinck.be>
Wed, 15 Jul 2009 20:12:10 +0000 (22:12 +0200)
committerDieter Plaetinck <dieter@plaetinck.be>
Wed, 15 Jul 2009 20:12:10 +0000 (22:12 +0200)
AUTHORS
examples/data/uzbl/scripts/yank.sh

diff --git a/AUTHORS b/AUTHORS
index e744900..3533097 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -24,7 +24,7 @@ Contributors:
     Tom Adams (holizz) - few patches, cookies.py, gtkplug/socket & proof of concept uzbl_tabbed.py
     neutralinsomniac - load_progress = 0 fix
     Maximilian Gaß (mxey) - several small patches
-    Abel Camarillo (00z) - make it compile on OpenBSD
+    Abel Camarillo (00z) - various portability fixes, such as BSD fixes for Makefile and posix shell scripts
     (israellevin) - toggle_zoom_type
     (kmeaw) - fix for multibyte utf8 characters segfault
     (evocallaghan) - tiny patches
index f953ec7..376b7e2 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # use this script to pipe any variable to xclip, so you have it in your clipboard
 # in your uzbl config, make the first argument the number of the (later) argument you want to use (see README for list of args)
 # make the 2nd argument one of : primary, secondary, clipboard.
@@ -6,8 +6,12 @@
 # bind    yurl      = spawn ./examples/scripts/yank.sh 6 primary
 # bind    ytitle    = spawn ./examples/scripts/yank.sh 7 clipboard
 
-which xclip &>/dev/null || exit 1
-[ "$9" == primary -o "$9" == secondary -o "$9" == clipboard ] || exit 2
+clip=xclip
 
-echo echo -n "${!8}" '|' xclip -selection $9
-echo -n "${!8}" | xclip -selection $9
+which $clip &>/dev/null || exit 1
+[ "x$9" = xprimary -o "x$9" = xsecondary -o "x$9" = xclipboard ] || exit 2
+
+value=`eval "echo -n \\${$8}"` # bash: value = ${!8}
+
+echo "echo -n '${value}' | $clip -selection $9"
+echo -n "'${value}' | $clip -selection $9"