aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-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