From 3f33558e48612004b70d0b726f7e5651b6f67ea1 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Sun, 16 May 2010 15:11:12 +0200 Subject: Avoid bash specific syntax in helpers Most of our helpers don't really depend on bash, and work just fine with every system shell. Thus, let's avoid "bashisms" in there to accomodate more bare-bone shells (like dash, see https://wiki.ubuntu.com/DashAsBinSh ) Signed-off-by: Luca Bruno --- examples/data/scripts/instance-select-wmii.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/data/scripts/instance-select-wmii.sh') diff --git a/examples/data/scripts/instance-select-wmii.sh b/examples/data/scripts/instance-select-wmii.sh index fdd27e6..64b859e 100755 --- a/examples/data/scripts/instance-select-wmii.sh +++ b/examples/data/scripts/instance-select-wmii.sh @@ -20,7 +20,7 @@ else DMENU="dmenu -i" fi -if [ "$1" == 'list' ] +if [ "$1" = 'list' ] then list= # get window id's of uzbl clients. we could also get the label in one shot but it's pretty tricky @@ -29,9 +29,9 @@ then label=$(wmiir read /client/$i/label) list="$list$i : $label\n" done - window=$(echo -e "$list" | $DMENU $COLORS | cut -d ' ' -f1) + window=$(printf "$list\n" | $DMENU $COLORS | cut -d ' ' -f1) wmiir xwrite /tag/sel/ctl "select client $window" -elif [ "$1" == 'next' ] +elif [ "$1" = 'next' ] then current=$(wmiir read /client/sel/ctl | head -n 1) # find the next uzbl window and focus it @@ -40,7 +40,7 @@ then then wmiir xwrite /tag/sel/ctl "select client $next" fi -elif [ "$1" == 'prev' ] +elif [ "$1" = 'prev' ] then current=$(wmiir read /client/sel/ctl | head -n 1) prev=$(wmiir read /tag/sel/index | grep -B 10000 " $current " | tac | grep -m 1 uzbl | cut -d ' ' -f2) -- cgit v1.2.3