... | ... |
@@ -172,7 +172,12 @@ function fgfs () { |
172 | 172 |
############ SERVEUR MULTIPLAY ? |
173 | 173 |
elif set -o BASH_REMATCH && [[ $fgfs_arg =~ "^mp([0-9]+)$" ]]; then |
174 | 174 |
fgfs_args+=("--multiplay=out,10,mpserver${BASH_REMATCH[2]}.flightgear.org,5000") |
175 |
- fgfs_args+=("--callsign=f-zakh") |
|
175 |
+ if test -n "$(ls -rt1 $HOME/.fgfs/autosave_*.xml | tail -1)"; then |
|
176 |
+ callsign=$(sed -rn 's/^.*<callsign.*>(.+)<.callsign>.*$/\1/p' $(ls -rt1 $HOME/.fgfs/autosave_*.xml | tail -1)) |
|
177 |
+ fi |
|
178 |
+ if test -n "$callsign"; then |
|
179 |
+ fgfs_args+=("--callsign=$callsign") |
|
180 |
+ fi |
|
176 | 181 |
test -z "$bash_rematch_set" && set +o BASH_REMATCH |
177 | 182 |
|
178 | 183 |
############ DEMANDE DE TRACE DE VOL ? |