lib/Tools/go
author wenzelm
Fri, 07 Jun 2024 12:39:14 +0200
changeset 80288 bc48bc7d0801
parent 80013 f1686f71dffc
permissions -rwxr-xr-x
clarified signature: more explicit preprocessing;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
80011
b082476a8036 dynamic setup of Go component, similar to Dotnet;
wenzelm
parents:
diff changeset
     1
#!/usr/bin/env bash
b082476a8036 dynamic setup of Go component, similar to Dotnet;
wenzelm
parents:
diff changeset
     2
#
b082476a8036 dynamic setup of Go component, similar to Dotnet;
wenzelm
parents:
diff changeset
     3
# Author: Makarius
b082476a8036 dynamic setup of Go component, similar to Dotnet;
wenzelm
parents:
diff changeset
     4
#
b082476a8036 dynamic setup of Go component, similar to Dotnet;
wenzelm
parents:
diff changeset
     5
# DESCRIPTION: invoke go within the Isabelle environment
b082476a8036 dynamic setup of Go component, similar to Dotnet;
wenzelm
parents:
diff changeset
     6
b082476a8036 dynamic setup of Go component, similar to Dotnet;
wenzelm
parents:
diff changeset
     7
if [ -z "$ISABELLE_GOEXE" ]; then
b082476a8036 dynamic setup of Go component, similar to Dotnet;
wenzelm
parents:
diff changeset
     8
  echo "Missing Go installation: need to run \"isabelle go_setup\" first" >&2
b082476a8036 dynamic setup of Go component, similar to Dotnet;
wenzelm
parents:
diff changeset
     9
  exit 2
b082476a8036 dynamic setup of Go component, similar to Dotnet;
wenzelm
parents:
diff changeset
    10
else
80013
f1686f71dffc proper platform_path for Windows;
wenzelm
parents: 80011
diff changeset
    11
  export GOROOT="$(platform_path "$ISABELLE_GOROOT")"
80011
b082476a8036 dynamic setup of Go component, similar to Dotnet;
wenzelm
parents:
diff changeset
    12
  exec "$ISABELLE_GOEXE/go" "$@"
b082476a8036 dynamic setup of Go component, similar to Dotnet;
wenzelm
parents:
diff changeset
    13
fi