#!/bin/bash
[% c("var/set_default_env") -%]

tar -xf $rootdir/[% c('input_files_by_name/go') %]

pushd go
# Disable go autoupdates (tor-browser-build#41345)
# See https://go.dev/doc/toolchain
sed -i -e 's/^GOTOOLCHAIN=.*/GOTOOLCHAIN=local/' go.env
popd
mv go [% project %]

[% c('tar', {
        tar_src => [ project ],
        tar_args => '-caf ' _ dest_dir _ '/' _ c('filename'),
    }) %]
