#!/bin/bash

# Bail early if we're asked to get a 32 bit JDK on a Mac:
# Mac stopped supporting 32 bit applications long ago, per Gemini
OS_ALLCAPS=`uname -s | sed 's/_.*$//' | tr 'a-z' 'A-Z'`

if [ "$OS_ALLCAPS" = "DARWIN" ] && [ "$bit" = "32" ]; then
    echo "ERROR: Darwin detected, but Mac long ago dropped all support for "
    echo "   32 bit applications, including 32 bit JDK."
    echo "SOLUTION: Run get-selfcontained-jdk64.sh instead of this script."
    exit 1
fi

./get-selfcontained-jdk.sh -b 32 $*
