Maven redirects some requests to other servers, but unless curl is told
to follow redirects using the -L/--location flag, it will simply
download the HTML response for the HTTP 301 "Moved permanently" message,
breaking the ability to compile Hatch.
This commit adds the "-L" flag to the curl request for
lib/json-
20160810.jar, resolving the issue.
Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
mkdir -p lib
if [ ! -f lib/$JSON_JAR ]; then
echo "Fetching JSON libs..."
- curl -o lib/$JSON_JAR $JSON_URL
+ curl -L -o lib/$JSON_JAR $JSON_URL
fi;
rm -rf "$JDK_DIR_SHORT" "$JFX_DIR_SHORT";