forked from stb-tester/stb-tester
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stbt-camera
executable file
·34 lines (29 loc) · 1014 Bytes
/
stbt-camera
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# Copyright 2014 stb-tester.com Ltd.
# License: LGPL v2.1 or (at your option) any later version (see
# https://github.com/stb-tester/stb-tester/blob/master/LICENSE for details).
#/ usage: stbt camera [--help] <command> [args]
#/
#/ Available commands are:
#/ calibrate Configure stb-tester to use a camera pointing at a TV for
#/ input
#/ validate Measure the quality of camera input/calibration
#/
#/ For help on a specific command do 'stbt camera <command> --help'.
#/ See 'man stbt' for more detailed information.
this_dir=$(dirname "$0")
export PYTHONPATH="$this_dir:$PYTHONPATH"
usage() { grep '^#/' "$0" | cut -c4-; }
[ $# -ge 1 ] || { usage >&2; exit 1; }
cmd=$1
shift
case "$cmd" in
-h|--help)
usage; exit 0;;
calibrate)
exec "$this_dir"/stbt-camera.d/stbt_camera_calibrate.py "$@";;
validate)
exec "$this_dir"/stbt-run "$this_dir"/stbt-camera.d/stbt_camera_validate.py "$@";;
*)
usage >&2; exit 1;;
esac