blob: 47d96ab96f9d6dd2249b40b039d5cf178593c197 [file] [log] [blame]
#!/bin/bash
set -eu
if [ $# -lt 1 ]; then
echo "usage $0 <version-name>"
exit 1;
fi
readonly VERSION_NAME=$1
shift 1
if [[ ! "$VERSION_NAME" =~ ^2\. ]]; then
echo 'Version name must begin with "2."'
exit 2
fi
if [[ "$VERSION_NAME" =~ " " ]]; then
echo "Version name must not have any spaces"
exit 3
fi
pushd $(mktemp -d)
wget https://github.com/google/dagger/archive/dagger-$VERSION_NAME.zip -P .
OUTPUT=$(shasum -a 256 dagger-$VERSION_NAME.zip)
echo "SHA sum: $OUTPUT"
popd