summaryrefslogtreecommitdiff
path: root/util/fbsetbg
diff options
context:
space:
mode:
Diffstat (limited to 'util/fbsetbg')
-rw-r--r--util/fbsetbg42
1 files changed, 21 insertions, 21 deletions
diff --git a/util/fbsetbg b/util/fbsetbg
index 3db53da..a75f461 100644
--- a/util/fbsetbg
+++ b/util/fbsetbg
@@ -130,28 +130,28 @@ Common tips to use with $command:
130EOF 130EOF
131} 131}
132 132
133# ugly code for solaris compat. 133# some which's have a reliable return code, some don't
134case `uname` in 134# Lets figure out which which we have.
135 Linux|*BSD) 135if which this_program_does_not_exist-no_really-aA1zZ9 >/dev/null 2>/dev/null; then
136 find_it() { 136 # can't rely on return value
137 which $1 > /dev/null 2>&1 && shift && $* 137 find_it() {
138 } 138 file=`which $1 2> /dev/null`
139 ;; 139 if [ -x "$file" ]; then
140 *) 140 if [ $# -gt 1 ]; then
141 find_it() { 141 shift
142 file=`which $1 2> /dev/null` 142 $*
143 if [ -x "$file" ]; then
144 if [ $# -gt 1 ]; then
145 shift
146 $*
147 fi
148 return 0
149 else
150 return 1
151 fi 143 fi
152 } 144 return 0
153 ;; 145 else
154esac 146 return 1
147 fi
148 }
149else
150 # can rely on return value
151 find_it() {
152 which $1 > /dev/null 2>&1 && shift && $*
153 }
154fi
155 155
156message() { 156message() {
157 157