[
    {
        "UpdateStageName": "open.mp Download",
        "UpdateSourcePlatform": "Windows",
        "UpdateSource": "GithubRelease",
        "UpdateSourceArgs": "openmultiplayer/open.mp",
        "UpdateSourceData": "open.mp-win-x86.zip",
        "UpdateSourceTarget": "{{$FullBaseDir}}",
        "OverwriteExistingFiles": true,
        "UnzipUpdateSource": true,
        "DeleteAfterExtract": true
    },
    {
        "UpdateStageName": "open.mp Download",
        "UpdateSourcePlatform": "Linux",
        "UpdateSource": "GithubRelease",
        "UpdateSourceArgs": "openmultiplayer/open.mp",
        "UpdateSourceData": "open.mp-linux-x86.tar.gz",
        "UpdateSourceTarget": "{{$FullBaseDir}}",
        "OverwriteExistingFiles": true,
        "UnzipUpdateSource": true,
        "DeleteAfterExtract": true
    },
    {
        "UpdateStageName": "open.mp Installation",
        "UpdateSourcePlatform": "Windows",
        "UpdateSource": "Executable",
        "UpdateSourceData": "powershell.exe",
        "UpdateSourceArgs": "-NoProfile -Command \"Set-Location -Path 'openmp/server'; @('config.json', 'bans.json') | ForEach-Object { if (Test-Path \\\"$_\\\") { Remove-Item -Path \\\"Server/$_\\\" -Recurse -Force -ErrorAction SilentlyContinue | Out-Null } }; Copy-Item -Path 'Server/*' -Destination '.' -Recurse -Force -ErrorAction SilentlyContinue | Out-Null; Remove-Item -Path 'Server' -Recurse -Force -ErrorAction SilentlyContinue | Out-Null\"",
        "SkipOnFailure": false
    },
    {
        "UpdateStageName": "open.mp Installation",
        "UpdateSourcePlatform": "Linux",
        "UpdateSource": "Executable",
        "UpdateSourceData": "/bin/bash",
        "UpdateSourceArgs": "-c \"cd openmp/server && for file in config.json bans.json; do [ -e \\\"$file\\\" ] && rm -f \\\"Server/$file\\\" >/dev/null 2>&1; done; \\cp -rf Server/* ./ >/dev/null 2>&1 && rm -rf Server >/dev/null 2>&1\"",
        "SkipOnFailure": false
    },
    {
        "UpdateStageName": "Create plugins Directory",
        "UpdateSourcePlatform": "All",
        "UpdateSource": "CreateDirectory",
        "UpdateSourceArgs": "{{$FullBaseDir}}plugins"
    }
]