. ./loggregator/src/exiter.ps1

$GOLANG_ZIP="golang/go1.8.3.windows-amd64.zip"
try
{
    Add-Type -AssemblyName System.IO.Compression.FileSystem
    function Unzip
    {
        param([string]$zipfile, [string]$outpath)

        [System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
    }

    $BOSH_INSTALL_TARGET = Resolve-Path "${env:BOSH_INSTALL_TARGET}"
    Unzip "$GOLANG_ZIP" "$BOSH_INSTALL_TARGET"
}
catch
{
    Write-Error "Error installing go:"
    Write-Error $_.Exception.Message
    Exit 1
}
Exit 0
