gpsd/tests/smoke/runtest.sh
2024-03-20 13:27:47 +01:00

28 lines
344 B
Bash
Executable File

#!/bin/bash
set -e
r=0
executables=$(rpm -ql gpsd gpsd-clients | grep -E '/s?bin/')
for b in $executables; do
case "$(basename "$b")" in
gpsdebuginfo)
continue;;
zerk)
h="-h";;
*)
h="--help";;
esac
if "$b" "$h" |& grep -qi '^usage *:'; then
echo "$b OK"
else
echo "$b FAILED"
"$b" "$h" || :
r=1
fi
done
exit $r