Comparing sensitive data, confidential files or internal emails?

Most legal and privacy policies prohibit uploading sensitive data online. Diffchecker Desktop ensures your confidential information never leaves your computer. Work offline and compare documents securely.

arch compare

Created Diff never expires
20 removals
34 lines
12 additions
25 lines
function verifyZitiVersionExists {
function getLatestZitiVersion {
setupZitiHome
setupZitiHome


if ! setOs; then
if ! setOs; then
return 1
return 1
fi
fi


ZITI_ARCH="amd64"
ZITI_ARCH="amd64"
detected_arch="$(uname -m)"
if [[ "$(uname -a)" == *"arm"* ]] && [[ "${ZITI_OSTYPE}" == "darwin" ]]; then
# Apple M1 silicon
if [[ "${detected_arch}" == *"arm"* ]] && [[ "${ZITI_OSTYPE}" == "darwin" ]]; then
echo -e "$(YELLOW "WARN: It has been detected that you are using an Apple computer with ARM architecture. Deployment of Apple ARM architecture distributions is currently unsupported through git, the installer will pull darwin amd distribution instead.")"
echo -e "$(YELLOW "WARN: It has been detected that you are using an Apple computer with ARM architecture. Deployment of Apple ARM architecture distributions is currently unsupported through git, the installer will pull darwin amd distribution instead.")"
# LLVM 64 bit backends have merged so some versions of *nix use aarch64 while others use arm64 for parity with Apple
elif [[ "$(uname -a)" == *"arm"* ]]; then
elif [[ "${detected_arch}" == *"aarch64"* ]] || [[ "${detected_arch}" == *"arm64"* ]]; then
ZITI_ARCH="arm64"
elif [[ "${detected_arch}" == *"arm"* ]]; then
ZITI_ARCH="arm"
ZITI_ARCH="arm"
fi
fi


unset ZITI_BINARIES_VERSION
unset ZITI_BINARIES_VERSION


ziticurl="$(curl -s https://api.github.com/repos/openziti/ziti/releases/tags/"${ZITI_VERSION_OVERRIDE}")"
if [[ "${ZITI_BINARIES_VERSION-}" == "" ]]; then
# shellcheck disable=SC2155
zitilatest=$(curl -s https://api.github.com/repos/openziti/ziti/releases/latest)
export ZITI_BINARIES_FILE=$(echo "${ziticurl}" | tr '\r\n' ' ' | jq -r '.assets[] | select(.name | startswith("'"ziti-${ZITI_OSTYPE}-${ZITI_ARCH}"'")) | .name')
# shellcheck disable=SC2155
# shellcheck disable=SC2155
export ZITI_BINARIES_FILE=$(echo "${zitilatest}" | tr '\r\n' ' ' | jq -r '.assets[] | select(.name | startswith("'"ziti-${ZITI_OSTYPE}-${ZITI_ARCH}"'")) | .name')
export ZITI_BINARIES_VERSION=$(echo "${ziticurl}" | tr '\r\n' ' ' | jq -r '.tag_name')
# shellcheck disable=SC2155

export ZITI_BINARIES_VERSION=$(echo "${zitilatest}" | tr '\r\n' ' ' | jq -r '.tag_name')
# Check if there was an error while trying to get the requested version
if [[ "${ZITI_BINARIES_VERSION-}" == "null" ]]; then
return 1
fi
fi

echo "ZITI_BINARIES_VERSION: ${ZITI_BINARIES_VERSION}"
echo "ZITI_BINARIES_VERSION: ${ZITI_BINARIES_VERSION}"
}
}