summaryrefslogtreecommitdiffstats
path: root/scripts/sh/deploy_go.sh
blob: 00377dd5f72cd7a9ad4ac61d452123de36132a2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
DISTRIB=$(awk -F= '/^NAME/{print $2}' /etc/os-release)
echo $DISTRIB
if [[ ${DISTRIB} = "openSUSE Leap" ]]
echo
then
read -p "Deploy Go on this system? " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
if [ ! -f /etc/zypp/repos.d/go.repo ]
then
REPO="https://download.opensuse.org/repositories/devel:/languages:/go/openSUSE_Leap_15.3/devel:languages:go.repo"
zypper ar --gpgcheck-allow-unsigned-repo $REPO
fi
zypper ref
zypper in -y go
echo OK
fi
else
echo "This is currently only compatible with SUSE Leap nodes."
fi