diff options
| author | Fuwn <[email protected]> | 2024-06-07 22:54:17 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-06-07 22:54:17 +0000 |
| commit | 5443e3a00f1558f981b30bb0a0cf6fc419096c74 (patch) | |
| tree | d2c830494a5c0412eee8c0d775d8c7f50549378e | |
| parent | fix(decompile): apply source patches for compilation (diff) | |
| download | worldsplayer_source_editor-5443e3a00f1558f981b30bb0a0cf6fc419096c74.tar.xz worldsplayer_source_editor-5443e3a00f1558f981b30bb0a0cf6fc419096c74.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 |