[
    {
        "UpdateStageName": "SteamCMD Download",
        "UpdateSourcePlatform": "All",
        "UpdateSource": "SteamCMD",
        "UpdateSourceData": "374040",
        "UpdateSourceArgs": "374040",
        "ForceDownloadPlatform": "Windows",
        "SkipOnFailure": false
    },
    {
        "UpdateStageName": "Server Extract",
        "UpdateSourcePlatform": "Windows",
        "UpdateSource": "Executable",
        "UpdateSourceData": "cmd.exe",
        "UpdateSourceArgs": "/C cd portal-knights\\374040 && tar -xf dedicated_server.zip",
        "SkipOnFailure": false
    },
    {
        "UpdateStageName": "Server Extract",
        "UpdateSourcePlatform": "Linux",
        "UpdateSource": "Executable",
        "UpdateSourceData": "/bin/bash",
        "UpdateSourceArgs": "-c \"cd portal-knights/374040 && unzip -u dedicated_server.zip\"",
        "SkipOnFailure": false
    },
    {
        "UpdateStageName": "Config File Download",
        "UpdateSourcePlatform": "All",
        "UpdateSource": "FetchURL",
        "UpdateSourceData": "https://raw.githubusercontent.com/CubeCoders/AMPTemplates/main/portal-knightsserver_config.json",
        "UpdateSourceTarget": "{{$FullBaseDir}}",
        "UpdateSourceArgs": "server_config.json",
        "OverwriteExistingFiles": false,
        "SkipOnFailure": false
    },
    {
        "UpdateStageName": "Initialise Wine",
        "UpdateSourcePlatform": "Linux",
        "UpdateSource": "Executable",
        "UpdateSourceData": "/bin/bash",
        "UpdateSourceArgs": "-c \"rm -rf \\\"{{$FullRootDir}}.wine\\\" >/dev/null 2>&1; WINEPREFIX=\\\"{{$FullRootDir}}.wine\\\" WINEARCH=win64 WINEDEBUG=-all /usr/bin/wineboot --init\"",
        "SkipOnFailure": false
    }
]