mirror of
https://gitea.blesmrt.net/mikaela/scripts.git
synced 2025-01-22 02:04:09 +01:00
bash/usr-local-bin/go: add a quick go snap wrapper
mainly for Debian/Ubuntu LTS
This commit is contained in:
parent
9dfe96b324
commit
7afdacb5a3
17
bash/usr-local-bin/go
Executable file
17
bash/usr-local-bin/go
Executable 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
|
Loading…
Reference in New Issue
Block a user