aboutsummaryrefslogtreecommitdiff
path: root/util/fbsetbg
diff options
context:
space:
mode:
Diffstat (limited to 'util/fbsetbg')
-rw-r--r--util/fbsetbg17
1 files changed, 14 insertions, 3 deletions
diff --git a/util/fbsetbg b/util/fbsetbg
index 17c2efe..0cf9cfb 100644
--- a/util/fbsetbg
+++ b/util/fbsetbg
@@ -133,9 +133,20 @@ Common tips to use with $command:
133EOF 133EOF
134} 134}
135 135
136find_it() { 136# some shell's hash returns 0 always
137 [ -n "$1" ] && hash $1 2> /dev/null 137if hash this_program_does_not_exist-no_really-aA1zZ9 > /dev/null 2>&1; then
138} 138 # can't rely on return value
139 # ash / ksh
140 find_it() {
141 which "$1" > /dev/null 2>&1
142 }
143else
144 # can rely on return value
145 # bash / dash / zsh / sh on Solaris
146 find_it() {
147 [ -n "$1" ] && hash "$1" 2> /dev/null
148 }
149fi
139 150
140message() { 151message() {
141 152