aboutsummaryrefslogtreecommitdiff
path: root/bin/vex
blob: 908288ba850b4b1da9a1098628fc173cc8693807 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
# 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"