#!/usr/bin/env bash

set -o errexit

# Platform tarball
TARBALL='eclipse-platform-I20210214-1800-linux-gtk-x86_64.tar.gz'

REPOS='
http://download.eclipse.org/eclipse/updates/4.19-I-builds/I20210214-1800
'

IUS='
org.eclipse.jdt.feature.group
'

cd ~
rm -rf .eclipse .eclipsesettings .p2 eclipse workspace
tar xf $TARBALL
eclipse/eclipse -noSplash \
 -application org.eclipse.equinox.p2.director \
 -repository $(echo $REPOS | tr ' ' ,) \
 -i $(echo $IUS | tr ' ' ,) \
 -vmargs -Xmx4096m -Declipse.p2.mirrors=false
eclipse/eclipse -debug -console -consoleLog -Xms512m -Xmx4096m
