]> rtime.felk.cvut.cz Git - hubacji1/rrts.git/blob - wvtest/runnable
ecd7134c8595fbc7e81296b7831ccd9aa79e277f
[hubacji1/rrts.git] / wvtest / runnable
1 #!/bin/sh
2 # Returns 0 (success) if the given program is runnable.
3 #
4 # This is better than using [ -x /usr/bin/program ] because it avoids
5 # the need to hardcode the program's path; it searches $PATH instead.
6 #
7 if [ $# != 1 ]; then
8   echo "usage: $0 <programname>" >&2
9   exit 1
10 fi
11 type "$1" >/dev/null 2>&1