bash/usr-local-bin/go: add a quick go snap wrapper

mainly for Debian/Ubuntu LTS
This commit is contained in:
Aminda Suomalainen 2022-05-18 15:46:00 +03:00
parent 9dfe96b324
commit 7afdacb5a3
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
1 changed files with 17 additions and 0 deletions

17
bash/usr-local-bin/go Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Using the snap version of go if available
set -x
# Check if go is installed through snap
if [ -f /snap/bin/go ]
then
snap run go $@
# Fallback to system installation
else
/usr/bin/go $@
fi
set +x