x plane: Add ortho4XP scenery update script to x-plane-env

master
Michael Raitza 2022-06-09 18:00:44 +02:00
parent 04b4442abb
commit 32fa0d93b3
1 changed files with 21 additions and 4 deletions

View File

@ -35,10 +35,15 @@ let
Installer run Installer
SHELL run bash inside FHS environment
prepare prepare all currently activated addons
revert [ADDON]... remove modifications from named addons
navdata FILE [OLDCYCLE] update navigation DB
/abs/path [ARG]... run /abs/path inside FHS environment
rel/path [ARG]... run $XPLANEPATH/rel/path inside FHS environment
revert [ADDON]...
remove modifications from named addons
navdata FILE [OLDCYCLE]
update navigation DB
ortho update links to zOrtho4XP scenery files
/abs/path [ARG]...
run /abs/path inside FHS environment
rel/path [ARG]...
run $XPLANEPATH/rel/path inside FHS environment
EOF
}
sys=${stdenv.targetPlatform.system}
@ -57,6 +62,7 @@ let
prepare) exec ${prepareScript} ;;
revert) shift; exec ${revertScript} "$@" ;;
navdata) shift; exec ${navdbScript} "$@" ;;
ortho) exec ${orthoScript} ;;
/*) exec "$@" ;;
*) shift; exec "''${XPLANEPATH}/$bin" "$@" ;;
esac
@ -166,6 +172,17 @@ let
ln -sf "$newpath" "$XPLANEPATH/Custom Data"
'';
orthoScript = writeScript "update-scenery-packs-ini" ''
: ''${XPLANEPATH:=${xplanePathStr}}
(
cd "$XPLANEPATH"
sed -i -e '/^SCENERY_PACK Custom Scenery\/zOrtho4XP_.*$/d' "Custom Scenery/scenery_packs.ini"
for f in "Custom Scenery/zOrtho4XP_"*; do
echo "SCENERY_PACK $f"
done >>"Custom Scenery/scenery_packs.ini"
)
'';
in buildFHSUserEnv rec {
name = "x-plane-env";
passthru = { inherit addons; };