x plane: Add ortho4XP scenery update script to x-plane-env
parent
04b4442abb
commit
32fa0d93b3
|
@ -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; };
|
||||
|
|
Loading…
Reference in New Issue