#!/bin/bash
set -e

WGET="wget"

if [[ "$OSTYPE" == "darwin"* ]]; then
    # Mac OSX
    WGET="./Tools/wget_osx"
fi

$WGET -N http://10ghost.net/MAMEHubDownloads/Frontend/MAMEHubClient.jar -P MAMEHubRepo/Binaries/dist

pushd MAMEHubRepo/Binaries/dist
java -Xmx1g -jar MAMEHubClient.jar
popd
