X-Plane improve Navdata updates
parent
ce83b956fa
commit
aee0a14966
|
@ -141,6 +141,8 @@ let
|
||||||
elif [ -e "$XPLANEPATH/Custom Data/cycle_info.txt" ]; then
|
elif [ -e "$XPLANEPATH/Custom Data/cycle_info.txt" ]; then
|
||||||
oldcycle=$(head -n1 "$XPLANEPATH/Custom Data/cycle_info.txt" | sed -E -n -e "s/^AIRAC cycle[ :]+([0-9]+)\r$/\1/p")
|
oldcycle=$(head -n1 "$XPLANEPATH/Custom Data/cycle_info.txt" | sed -E -n -e "s/^AIRAC cycle[ :]+([0-9]+)\r$/\1/p")
|
||||||
[ -n "$oldcycle" ] || { printf "Unable to determine old AIRAC cycle\n" >&2; exit 1; }
|
[ -n "$oldcycle" ] || { printf "Unable to determine old AIRAC cycle\n" >&2; exit 1; }
|
||||||
|
else
|
||||||
|
oldcycle=
|
||||||
fi
|
fi
|
||||||
f=$1
|
f=$1
|
||||||
[ -e "$f" ] || { printf "No such file or directory\n" >&2; exit 1; }
|
[ -e "$f" ] || { printf "No such file or directory\n" >&2; exit 1; }
|
||||||
|
@ -148,7 +150,9 @@ let
|
||||||
cycle=''${cycle%.zip}
|
cycle=''${cycle%.zip}
|
||||||
newpath="$XPLANEPATH/Custom Data AIRAC$cycle"
|
newpath="$XPLANEPATH/Custom Data AIRAC$cycle"
|
||||||
|
|
||||||
if [ ! -h "$XPLANEPATH/Custom Data" ]; then
|
if [ -z "$oldcycle" ]; then
|
||||||
|
rm -r "$XPLANEPATH/Custom Data"
|
||||||
|
elif [ ! -h "$XPLANEPATH/Custom Data" ]; then
|
||||||
mv "$XPLANEPATH/Custom Data" "$XPLANEPATH/Custom Data AIRAC$oldcycle"
|
mv "$XPLANEPATH/Custom Data" "$XPLANEPATH/Custom Data AIRAC$oldcycle"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -173,7 +177,7 @@ let
|
||||||
Also, you can place the FAACIFP18 file here, which you can get from the FAA website: https://www.faa.gov/air_traffic/flight_info/aeronav/digital_products/cifp/
|
Also, you can place the FAACIFP18 file here, which you can get from the FAA website: https://www.faa.gov/air_traffic/flight_info/aeronav/digital_products/cifp/
|
||||||
If the file FAACIFP18 is found in this folder, X-Plane will load instrument flight procedures from this file.
|
If the file FAACIFP18 is found in this folder, X-Plane will load instrument flight procedures from this file.
|
||||||
EOF
|
EOF
|
||||||
rm "$XPLANEPATH/Custom Data"
|
rm -f "$XPLANEPATH/Custom Data"
|
||||||
ln -sf "$newpath" "$XPLANEPATH/Custom Data"
|
ln -sf "$newpath" "$XPLANEPATH/Custom Data"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue