Skip to content

Instantly share code, notes, and snippets.

@barlog-m
Created April 20, 2020 09:18
Show Gist options
  • Save barlog-m/cc1d6d0858ee3812f29a68c26164229e to your computer and use it in GitHub Desktop.
Save barlog-m/cc1d6d0858ee3812f29a68c26164229e to your computer and use it in GitHub Desktop.
#!/bin/env bash
# https://www.aerospike.com/artifacts/aerospike-server-community/
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
VERSION="4.9.0.4"
OS=el7
URL="https://www.aerospike.com/artifacts/aerospike-server-community/${VERSION}/aerospike-server-community-${VERSION}-${OS}.tgz"
ARCHIVE=aerospike-server.tgz
curl -o ${ARCHIVE} "${URL}"
SHA_256="$(curl -sSL "${URL}.sha256" | cut -d' ' -f1)"
ARCHIVE_SHA_256="$(sha256sum ${ARCHIVE} | cut -d' ' -f1)"
if [ "$SHA_256" != "$ARCHIVE_SHA_256" ]; then
echo "Wrong SHA 256 sum"
exit -1
fi
tar -xvf ${ARCHIVE}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment