aboutsummaryrefslogtreecommitdiff
path: root/bin/vex.sh
blob: 9e85c567e10f80fdea788334a50d6a700b9063c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Run a command and print a string to stdout showing pass/fail
if [ "$#" -eq 0 ] ; then
    printf >&2 'vex: Need a command\n'
    exit 2
fi
"$@"
ex=$?
case $ex in
    0) op='true' ;;
    *) op='false' ;;
esac
printf '%s\n' "$op"
exit "$ex"