#!/bin/bash

##################################################################################################
# Shell script that:
#    1. Generates a 'desktop' shortcut file
#    2. Copies the shortcut to the user's desktop
##################################################################################################

echo Creating desktop shortcut
echo "[Desktop Entry]"                                   >  temp.desktop
echo "Type=Application"                                 >> temp.desktop
echo "Version=1.0"                                      >> temp.desktop
echo "Name=ChromaMate"                                  >> temp.desktop
echo "Comment=Program to analyse and compare colours"   >> temp.desktop
echo "Icon=${PWD}/ChromaMateIcon48x48.png"              >> temp.desktop
echo "Exec=${PWD}/ChromaMate.sh"                        >> temp.desktop
echo "Path=${PWD}"                                      >> temp.desktop
echo "Categories=Utility;Application;"                  >> temp.desktop
chmod a+x temp.desktop
mv temp.desktop ~/Desktop/ChromaMate.desktop
