#!/usr/bin/env bash main() { # Replace this with your local path to worlds.jar local WORLDSPLAYER_JAR=${WORLDSPLAYER_JAR:-"${HOME}/.local/share/bottles/bottles/WorldsPlayer/drive_c/Program Files (x86)/Worlds Inc/WorldsPlayer - BowieFull/lib/worlds.jar"} echo "Using WORLDSPLAYER_JAR=${WORLDSPLAYER_JAR}" if [[ -d source ]]; then echo read -p "source directory already exists. Do you want to overwrite it? [y/N] " -n 1 -r echo if [[ ! ${REPLY} =~ ^[Yy]$ ]]; then echo "Exiting ..." exit 1 fi rm -rf source fi vineflower --explicit-generics=true "${WORLDSPLAYER_JAR}" source if command -v git &>/dev/null; then cd source || exit # Initialise from decompiled source git init git add . git commit -m "Initial commit" --no-gpg-sign # Apply source patches git apply ../patches/*.patch git add . git commit -m "Source patches" --no-gpg-sign cd .. fi } main