#!/bin/sh
here=$(pwd)
parent="$(dirname "$(pwd)")"
filename=~/Desktop/EtmaHandler.desktop
cat << EOF > $filename
[Desktop Entry] 
Comment=Mike Hay Filehandler
Terminal=false
Name=Etma Handler
Exec="${parent}/dist/jre/bin/java" -jar "${parent}/dist/etmaHandlerJ.jar"
Type=Application
Icon=${here}/etmahandlerj.png
Categories=Application;Office;
EOF
chmod +x $filename
mkdir ~/.local/share/applications
cp $filename ~/.local/share/applications/etmahandler.desktop
notify-send "There should now be an icon on your Desktop and in the menu"
