From 1df1d73d9432e2e93bf89e7cfc936521deb74427 Mon Sep 17 00:00:00 2001 From: Spencer Florence <spencer@florence.io> Date: Tue, 8 Aug 2017 16:41:08 -0500 Subject: [PATCH] give a better error message on missing installer (#21) --- install-racket.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/install-racket.sh b/install-racket.sh index 83143b0..881f31c 100755 --- a/install-racket.sh +++ b/install-racket.sh @@ -37,10 +37,19 @@ else fi if [ -n "$TEST" ]; then - printf "%s %-7s %-120s " $RACKET_MINIMAL $RACKET_VERSION $URL - if curl -I -L $URL 2>&1 | grep 404.Not.Found ; then - exit 1 + printf "%s %-7s %-120s " $RACKET_MINIMAL $RACKET_VERSION $URL +fi + +echo "Checking installer" +if curl -I -L $URL 2>&1 | grep 404.Not.Found ; then + echo "Installer not available" + if [[ "$RACKET_VERSION" = "HEAD" ]]; then + echo "Did the build fail? Check the logs at https://plt.eecs.northwestern.edu/snapshots/current/log/" fi + exit 1 +fi + +if [ -n "$TEST" ]; then echo "GOOD" exit 0 fi