comparison scripts/fc-rfcal-tri900 @ 90:713749548df6

fc-rfcal-tri900 script and fc-rfcal-tee helper implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 17 Jul 2017 05:51:31 +0000
parents
children
comparison
equal deleted inserted replaced
89:0937d34fb3ba 90:713749548df6
1 #!/bin/sh
2
3 case $# in
4 1)
5 ;;
6 2)
7 if [ ! -d "$2" ]
8 then
9 echo "error: specified report dir $2 is bad" 1>&2
10 exit 1
11 fi
12 ;;
13 *)
14 echo "usage: $0 txlevels-profile [report-dir]" 1>&2
15 exit 1
16 ;;
17 esac
18
19 profile_dir=/opt/freecalypso/rfcal/txlevels
20
21 if [ ! -f "$profile_dir/$1-900" ]
22 then
23 echo "error: $profile_dir/$1-900 profile missing" 1>&2
24 exit 1
25 fi
26
27 if [ ! -f "$profile_dir/$1-1800" ]
28 then
29 echo "error: $profile_dir/$1-1800 profile missing" 1>&2
30 exit 1
31 fi
32
33 if [ ! -f "$profile_dir/$1-1900" ]
34 then
35 echo "error: $profile_dir/$1-1900 profile missing" 1>&2
36 exit 1
37 fi
38
39 report_dir="$2"
40
41 run_cmd() {
42 if [ -n "$report_dir" ]
43 then
44 fc-rfcal-tee "$1" "$report_dir/$2"
45 else
46 eval "$1"
47 fi
48 rc=$?
49 if [ $rc != 0 ]
50 then
51 echo "error: $1 returned $rc" 1>&2
52 exit $rc
53 fi
54 }
55
56 run_cmd fc-rfcal-vcxo vcxo
57 run_cmd "fc-rfcal-rxband 900" rx-900
58 run_cmd "fc-rfcal-rxband 1800" rx-1800
59 run_cmd "fc-rfcal-rxband 1900" rx-1900
60 run_cmd "fc-rfcal-txband 900 $1" tx-900
61 run_cmd "fc-rfcal-txband 1800 $1" tx-1800
62 run_cmd "fc-rfcal-txband 1900 $1" tx-1900