#!/bin/bash set -uex bits=$(getconf LONG_BIT) if [[ "${bits}" != "64" ]]; then echo "This script is only supported on 64 bit OS. Please contact support@edgedelta.com" exit 1 fi arch_str="$(uname -m)" if [[ "${arch_str}" == *"arm"* || "${arch_str}" == *"aarch"* ]]; then echo "Using arm64 architecture" arch="arm64" elif [[ "${arch_str}" == "x86_64" ]]; then arch="amd64" else echo "This script does not support ${arch_str} architecture. Please contact support@edgedelta.com" exit 1 fi uname=$(uname) if [[ "${uname}" == "Linux" ]]; then release="edgedelta-linux-${arch}.sh" elif [[ "${uname}" == "Darwin" ]]; then release="edgedelta-macosx-${arch}.sh" else echo "This script does not support ${uname} os. Please contact support@edgedelta.com" exit 1 fi rm -f ${release} curl -O https://release.edgedelta.com/v0.1.38/"${release}" chmod +x ${release} if [[ "${UID}" = "0" ]]; then ED_API_KEY="${ED_API_KEY}" ./${release} else sudo ED_API_KEY="${ED_API_KEY}" ./${release} fi