Created
February 20, 2020 15:49
-
-
Save gelin/deef007eabc9b205ef73891451bbf1c3 to your computer and use it in GitHub Desktop.
Installs Redmine Time Tracker to main menu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Adds Redmine Time Tracker to the main menu. | |
# https://www.redmine.org/plugins/redmine-time-tracking-software | |
set -e | |
jar=$(find $PWD/ -name "*.jar") | |
echo "Found '$jar'" | |
if [ ! -f "$jar" ] | |
then | |
echo "Run install.sh from the folder with 'Redmine Time Tracker - x.x.x.jar' file" | |
exit 1 | |
fi | |
vendor="java" | |
class="RedmineTimeTracker.RedmineTimeTracker" | |
title="Redmine Time Tracker" | |
unzip -ju "$jar" "RedmineTimeTracker/resources/*logo*.png" | |
xdg-icon-resource install --size 128 redmine_logo_green.png "$vendor-$class" | |
cat > "$vendor-$class.desktop" <<EOF | |
[Desktop Entry] | |
Type=Application | |
Name=$title | |
Icon=$vendor-$class | |
Exec=java -XX:MaxRAM=256m -jar "$jar" | |
StartupWMClass=$class | |
Terminal=false | |
Categories=Development | |
EOF | |
xdg-desktop-menu install "$vendor-$class.desktop" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment