| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 | #!/bin/bashset -eif [ "$EUID" -ne 0 ]; then   echo "This script must be run as root"    exit 1fi[ -z "$KEY" ] && KEY=nokey;[ -z "$VERSION" ] && echo "no \$VERSION provided, fallback to latest" && VERSION=latest;dist=netclientecho "OS Version = $OSTYPE"echo "Netclient Version = $VERSION"if [[ "$OSTYPE" == "linux-gnu"* ]]; then	arch=$(uname -i)	echo "CPU ARCH = $arch"	if [ "$arch" == 'x86_64' ];	then 		dist=netclient 	fi	if [ "$arch" == 'x86_32' ];	then		dist=netclient-32	fi	if [ "$arch" == 'armv*' ];	then		dist=netclient-arm64	fielif [[ "$OSTYPE" == "darwin"* ]]; then        dist=netclient-darwinelse        echo "This OS is not currently supported via automated install"         exit 1fiecho "Binary = $dist"wget -O netclient https://github.com/gravitl/netmaker/releases/download/$VERSION/netclientchmod +x netclientsudo ./netclient join -t $KEYrm -f netclient
 |