summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorGeorg Pfuetzenreuter2021-07-23 18:26:54 +0200
committerGeorg Pfuetzenreuter2021-07-23 18:26:54 +0200
commit1d9db91b3bbf001d4ce8e641ea52db2199be3132 (patch)
treecf4fe8d1d5b79e152f4fd6d616cb405f15c65b61 /scripts
parent9ad1234cc4c05e5ee5d3dede508652bb30fe0966 (diff)
downloadsystem-1d9db91b3bbf001d4ce8e641ea52db2199be3132.tar.gz
system-1d9db91b3bbf001d4ce8e641ea52db2199be3132.tar.bz2
system-1d9db91b3bbf001d4ce8e641ea52db2199be3132.zip
Ergo deployment OS and existing installation check.
Signed-off-by: Georg Pfuetzenreuter <georg@lysergic.dev>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/sh/deploy_ergo.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/sh/deploy_ergo.sh b/scripts/sh/deploy_ergo.sh
index 29eb9e0..670e0e7 100755
--- a/scripts/sh/deploy_ergo.sh
+++ b/scripts/sh/deploy_ergo.sh
@@ -1,4 +1,11 @@
#!/bin/sh
+DISTRIB=$(awk -F= '/^NAME/{print $2}' /etc/os-release)
+echo "Detected $DISTRIB"
+if [[ ${DISTRIB} = "openSUSE Leap" ]]
+echo
+then
+if [ ! /opt/ergo ]
+then
GOVER=`go version | { read _ _ v _; echo ${v#go}; }`
echo "Detected Go $GOVER"
GOVER_REQ="1.16.0"
@@ -53,3 +60,9 @@ fi
else
echo "This is currently only compatible with Go 1.16.6 or higher. Consider deploy_go.sh."
fi
+else
+echo "Existing Ergo installation or leftovers detected. Consider remove_ergo.sh."
+fi
+else
+echo "This is currently only compatible with SUSE Leap nodes."
+fi