aboutsummaryrefslogtreecommitdiff
path: root/bin/decompile
blob: b038c646887e0eb298a4df3202b86853c6437b50 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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}"

	vineflower -ega=true "${WORLDSPLAYER_JAR}" source

	if command -v git &>/dev/null; then
		cd source || exit

		git init
		git add .
		git commit -m "$(date || true)" --no-gpg-sign

		cd ..
	fi
}

main