aboutsummaryrefslogtreecommitdiff
path: root/util/fbsetbg
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-01-23 11:30:59 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-01-23 11:30:59 (GMT)
commit97c5f126158f82f6edfd1ea13278c85824f41548 (patch)
tree03ec3eb3437aafcaa48b6aee4e61c25dfc92acdc /util/fbsetbg
parent4bd62b771c483144e939629cb95a4fafd5943b43 (diff)
downloadfluxbox_paul-97c5f126158f82f6edfd1ea13278c85824f41548.zip
fluxbox_paul-97c5f126158f82f6edfd1ea13278c85824f41548.tar.bz2
use hash instead of which in fbsetbg
Diffstat (limited to 'util/fbsetbg')
-rw-r--r--util/fbsetbg25
1 files changed, 3 insertions, 22 deletions
diff --git a/util/fbsetbg b/util/fbsetbg
index d11f5ee..64c8728 100644
--- a/util/fbsetbg
+++ b/util/fbsetbg
@@ -129,28 +129,9 @@ Common tips to use with $command:
129EOF 129EOF
130} 130}
131 131
132# some which's have a reliable return code, some don't 132find_it() {
133# Lets figure out which which we have. 133 [ -n "$1" ] && hash $1 2> /dev/null
134if which this_program_does_not_exist-no_really-aA1zZ9 >/dev/null 2>/dev/null; then 134}
135 # can't rely on return value
136 find_it() {
137 file=`which $1 2> /dev/null`
138 if [ -x "$file" ]; then
139 if [ $# -gt 1 ]; then
140 shift
141 $*
142 fi
143 return 0
144 else
145 return 1
146 fi
147 }
148else
149 # can rely on return value
150 find_it() {
151 which $1 > /dev/null 2>&1 && shift && $*
152 }
153fi
154 135
155message() { 136message() {
156 137