AMPTemplates/dayz-experimentalstart.json
2023-11-03 10:55:26 +11:00

35 lines
1.8 KiB
JSON

[
{
"UpdateStageName":"Delete Active File",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"Executable",
"UpdateSourceData":"/bin/bash",
"UpdateSourceArgs":"-c 'rm -f {{$FullBaseDir}}battleye/beserver_x64_active_*.cfg'"
},
{
"UpdateStageName":"Delete Active File",
"UpdateSourcePlatform":"Windows",
"UpdateSource":"Executable",
"UpdateSourceData":"cmd.exe",
"UpdateSourceArgs":"/C del /Q /F {{$FullBaseDir}}battleye\\beserver_x64_active_*.cfg"
},
{
"UpdateStageName":"Manage Bikeys",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"Executable",
"UpdateSourceData":"/bin/bash",
"UpdateSourceArgs":"-c 'cd dayz/1042420; find keys/ -name \"*.bikey\" ! -name \"dayz.bikey\" -exec rm {} +; IFS=\";\" read -ra subdirs_array <<< \"{{mod}}\" && for subdir in \"${subdirs_array[@]}\"; do find \"$subdir/keys\" -maxdepth 1 -mindepth 1 -type f -name \"*.bikey\" -exec \\cp -t keys/ {} +; done'",
"UpdateSourceConditionSetting":"ManageBikeys",
"UpdateSourceConditionValue":"true"
},
{
"UpdateStageName":"Manage Bikeys",
"UpdateSourcePlatform":"Windows",
"UpdateSource":"Executable",
"UpdateSourceData":"cmd.exe",
"UpdateSourceArgs":"/C start powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -Command \"$mod = '{{mod}}' -split ';'; Set-Location dayz\\1042420; Get-ChildItem -Path 'keys' -Filter '*.bikey' | ForEach-Object { if ($_.Name -ne 'dayz.bikey' -and -not ($_.Name -like '*dayz.bikey*')) { Remove-Item -LiteralPath $_.FullName -Force } }; foreach ($a in $mod) { Get-ChildItem -Path ('{0}\\keys' -f $a) -Filter '*.bikey' | Copy-Item -Destination 'keys' -Force }\"",
"UpdateSourceConditionSetting":"ManageBikeys",
"UpdateSourceConditionValue":"true"
}
]