Skip to content

Instantly share code, notes, and snippets.

@jmrodri
Last active October 26, 2020 23:08
Show Gist options
  • Save jmrodri/263003f10b32d829c47fde358d5e3069 to your computer and use it in GitHub Desktop.
Save jmrodri/263003f10b32d829c47fde358d5e3069 to your computer and use it in GitHub Desktop.
# get the arch and version information
ARCH=`uname -m`
VERSION='1.1.0'
OS=${OSTYPE//[0-9.]/}
if [[ "$OS" == "darwin" ]]; then
OS="apple-darwin"
fi
BINARY="operator-sdk-v$VERSION-$ARCH-$OS"
# DEBUG
echo $OS
echo $ARCH
echo $VERSION
echo $BINARY
# download the binary
curl -sL "https://github.com/operator-framework/operator-sdk/releases/download/v$VERSION/$BINARY" > $BINARY
# make it executable
chmod +x $BINARY
# Print the version of the binary
./$BINARY version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment