comparison scripts/fc-rfcal-tri850 @ 127:fd856f729618

scripts: fc-rfcal-tri850 added
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 24 Dec 2019 07:08:27 +0000
parents scripts/fc-rfcal-tri900@713749548df6
children
comparison
equal deleted inserted replaced
126:105e3a60edb8 127:fd856f729618
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-850" ]
22 then
23 echo "error: $profile_dir/$1-850 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 850" rx-850
58 run_cmd "fc-rfcal-rxband 1800" rx-1800
59 run_cmd "fc-rfcal-rxband 1900" rx-1900
60 run_cmd "fc-rfcal-txband 850 $1" tx-850
61 run_cmd "fc-rfcal-txband 1800 $1" tx-1800
62 run_cmd "fc-rfcal-txband 1900 $1" tx-1900