Hi, I made the original install and uninstall scripts, and this is an improved version with the following changes:
Don't assume every error is that java is not installed.
Check for the java command first and show that specific error instead of running the program.
If the program runs but has a bad exit code, create and show a full, dated error log (~/var/log/voxelshop/last_run.err) from the output (~/var/log/voxelshop/last_run.log)
Clean up the irrelevant err file on run, and remove both log files (and directories if empty) on uninstall.
Use xmessage instead of notify-send so the user doesn't miss the error message and can copy&paste it (also, xmessage is from xorg so it works on virtually any desktop environment).
More reliably ensure the correct panel is restarted (check for XDG_SESSION_DESKTOP or XDG_CURRENT_DESKTOP instead of relying on trial & error with killall).
Detect the static files in case not running from the static directory (for testing or other scenarios when static's contents aren't in the unzipped release folder from which the script must run). This change allows running the install script using an absolute path as long as the working directory contains the jar files and the install script is in the same folder as "share". For example, run the script using its full path the repo directory when the current directory is the unzipped directory of the latest zip release.
Hi, I made the original install and uninstall scripts, and this is an improved version with the following changes:
java
command first and show that specific error instead of running the program.~/var/log/voxelshop/last_run.err
) from the output (~/var/log/voxelshop/last_run.log
)XDG_SESSION_DESKTOP
orXDG_CURRENT_DESKTOP
instead of relying on trial & error withkillall
).