diff options
| author | Fuwn <[email protected]> | 2024-06-07 22:54:17 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-06-07 22:54:17 -0700 |
| commit | 1525c2e670efe2891d9712675dce1c40be9edbc5 (patch) | |
| tree | d2c830494a5c0412eee8c0d775d8c7f50549378e | |
| parent | fix(decompile): apply source patches for compilation (diff) | |
| download | worldsplayer_source_editor-1525c2e670efe2891d9712675dce1c40be9edbc5.tar.xz worldsplayer_source_editor-1525c2e670efe2891d9712675dce1c40be9edbc5.zip | |
feat(decompile): confirm overwrite
| -rwxr-xr-x | bin/decompile | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/decompile b/bin/decompile index 68a5546..6073e4b 100755 --- a/bin/decompile +++ b/bin/decompile @@ -6,6 +6,22 @@ main() { 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 |