Remove comment, remove sleep commands, download Apache RAT
diff --git a/scripts/verify-rc.sh b/scripts/verify-rc.sh
index b7b53f5..b5dc131 100755
--- a/scripts/verify-rc.sh
+++ b/scripts/verify-rc.sh
@@ -1,8 +1,5 @@
set -e
-#VERSION=0.2.0
-#RC=1
-
if [ -z "$VERSION" ] || [ -z "$RC" ]
then
echo "First set the VERSION and RC environment variables."
@@ -11,42 +8,40 @@
gpg --verify apache-annotator-*.tar.gz.asc
-sleep 5
-
sha256sum --check apache-annotator-*.tar.gz.sha256
sha512sum --check apache-annotator-*.tar.gz.sha512
-sleep 5
-
tar xzf apache-annotator-$VERSION-rc.$RC-incubating.tar.gz
cd apache-annotator-$VERSION-incubating
git remote show origin
-sleep 5
-
git fetch --unshallow origin tag v$VERSION-rc.$RC
git describe
-sleep 5
-
git status --ignored
-sleep 5
-
-# Expects Apache RAT 0.13 jar to be present in home directory
-# wget https://dlcdn.apache.org/creadur/apache-rat-0.13/apache-rat-0.13-bin.zip
-# unzip apache-rat-0.13-bin.zip
-java -jar ~/apache-rat-0.13.jar -E .ratignore -d .
-
-sleep 5
+# We need Apache RAT.
+RAT_VERSION="0.13"
+RAT_JAR_FOLDER="$HOME/.apache-rat-used-for-verifying-annotator"
+RAT_JAR_FILE_PATH="$RAT_JAR_FOLDER/apache-rat-${RAT_VERSION}/apache-rat-${RAT_VERSION}.jar"
+if [ ! -f "$RAT_JAR_FILE_PATH" ]
+then
+ read -p "Did not find Apache RAT at $RAT_JAR_FILE_PATH. Download it? [y/N] " response
+ if [[ $response =~ (Y|y|YES|Yes|yes) ]]
+ then
+ wget -c -P "$RAT_JAR_FOLDER" "https://dlcdn.apache.org/creadur/apache-rat-${RAT_VERSION}/apache-rat-${RAT_VERSION}-bin.zip"
+ unzip -d "$RAT_JAR_FOLDER" "$RAT_JAR_FOLDER/apache-rat-${RAT_VERSION}-bin.zip"
+ else
+ exit 0
+ fi
+fi
+java -jar "$RAT_JAR_FILE_PATH" -E .ratignore -d .
make
yarn build
make check
-sleep 5
-
yarn clean
git status --ignored