#!/usr/bin/env sh # launch or install PineconeMC offline minecraft launcher if not installed # launcher will download minecraft from mojang directly # prerequisite OpenJDK Java runtime environment will also be installed APP='ElyPrismLauncher' PREREQS='default-jre' DL_URL='https://github.com/ElyPrismLauncher/Launcher/releases/download/11.0.2/PineconeMC-Linux-Qt6-Portable-11.0.2.tar.gz' INSTALL_DIR="$HOME/.local/opt/$APP" mkdir -p "$INSTALL_DIR" [ ! -x "$INSTALL_DIR/$APP" ] && { user-confirm "Download and install $APP?" || exit 1 wget -O- "$DL_URL" | pigz -d | tar -xv -C "$INSTALL_DIR" chmod 755 "$INSTALL_DIR/$APP" } is-installed $PREREQS | xargs -r sudo apt-get -y install || exit 1 exec "$INSTALL_DIR/$APP"