-
Notifications
You must be signed in to change notification settings - Fork 2
/
aXmly
executable file
·87 lines (87 loc) · 2.56 KB
/
aXmly
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/sh
# Utility to auto-run xmly.py; creates OpenRadar procedures file and FGFS Sid/Star Rm routes according to given ICAO name
MNAM=${0##*/} && MNAM=${MNAM%%.*}
ICAO=${1##*/} && ICAO=${ICAO%%.*}
UNAM="whoami"
DNAM=${MNAM}
if [ "$1" = "-h " ]
then
echo "$MNAM Utility to auto-run xmly.py; creates OpenRadar procedures file and FGFS Sid/Star Rm routes according to given ICAO name "
fi
### Edit / Change these pathNames for your system
# subfolders with arg1 icaoName will be written with AIFP, KMLS, ORDR, RMV2, SCEN files
OUTPPATH="."
# path to FAA inppppppput data
DATAPATH="/data/ARDP"
#
TDIR="$ICAO/AIFP"
echo mkdir -p $TDIR
mkdir -p $TDIR
#
TDIR="$ICAO/ATPI"
echo mkdir -p $TDIR
mkdir -p $TDIR
#
TDIR="$ICAO/KMLS"
echo mkdir -p $TDIR
mkdir -p $TDIR
#
TDIR="$ICAO/LVLD"
echo mkdir -p $TDIR
mkdir -p $TDIR
#
TDIR="$ICAO/RMV2"
echo mkdir -p $TDIR
mkdir -p $TDIR
#
TDIR="$ICAO/SCEN"
echo mkdir -p $TDIR
mkdir -p $TDIR
##
#cd "$ICAO"
##
echo `pwd`
CALL="xmly.py -i $DATAPATH/STARDP.txt -f ARDP -n $ICAO -g ORDR -o $ICAO/procedures.xml -k $ICAO/$ICAO-skel.txt "
echo $CALL
#read -n1 -r -p "$MNAM Rdy OK ( AnyKey or Ctl-C to exit)"
$CALL
# preserve already customized spec file else offer new one
if [ ! -f "$ICAO/$ICAO-spec.txt" ]; then
sort $ICAO/$ICAO-skel.txt > $ICAO/$ICAO-spec.txt
nedit $ICAO/$ICAO-spec.txt
#
fi
#
CALL="xmly.py -i $DATAPATH/STARDP.txt -f ARDP -n $ICAO -g ORDR -o $ICAO/procedures.xml -s $ICAO/$ICAO-spec.txt "
echo $CALL
#read -n1 -r -p "$MNAM Rdy OK ( AnyKey or Ctl-C to exit)"
$CALL
#
CALL="xmly.py -i $DATAPATH/STARDP.txt -f ARDP -n $ICAO -g ATPI -o $ICAO/$ICAO "
echo $CALL
#read -n1 -r -p "$MNAM Rdy OK ( AnyKey or Ctl-C to exit)"
$CALL
#
CALL="xmly.py -i $DATAPATH/STARDP.txt -f ARDP -n $ICAO -g FGAI -o $ICAO/$ICAO-fgai.xml -s $ICAO/$ICAO-spec.txt "
echo $CALL
#read -n1 -r -p "$MNAM Rdy OK ( AnyKey or Ctl-C to exit)"
$CALL
#
CALL="xmly.py -i $DATAPATH/STARDP.txt -f ARDP -n $ICAO -g KMLS -o $ICAO/$ICAO-klst.xml "
echo $CALL
#read -n1 -r -p "$MNAM Rdy OK ( AnyKey or Ctl-C to exit)"
$CALL
sort $ICAO/$ICAO-klst.xml > $ICAO/$ICAO-kmls.xml
#
CALL="xmly.py -i $DATAPATH/STARDP.txt -f ARDP -n $ICAO -g FGLD -o $ICAO/$ICAO-fgld.xml -s $ICAO/$ICAO-spec.txt "
echo $CALL
#read -n1 -r -p "$MNAM Rdy OK ( AnyKey or Ctl-C to exit)"
$CALL
#
CALL="xmly.py -i $DATAPATH/STARDP.txt -f ARDP -n $ICAO -g RMV2 -o $ICAO/$ICAO-rmv2.xml "
echo $CALL
#read -n1 -r -p "$MNAM Rdy OK ( AnyKey or Ctl-C to exit)"
$CALL
#
#
echo "$MNAM $ICAO finis "