#!/bin/bash

mkdir $HOME/.eimza && cd $HOME/.eimza

wget https://static.turkiye.gov.tr/downloads/e-imza/elektronik-imza.jar
wget https://static.turkiye.gov.tr/downloads/e-imza/e-imza-icon64.png

touch eimza.sh

echo -e "#!/bin/bash\njava -jar $HOME/.eimza/elektronik-imza.jar" >> eimza.sh

chmod +x eimza.sh

touch $HOME/.local/share/applications/eimza.desktop && chmod +x $HOME/.local/share/applications/eimza.desktop

echo -e "[Desktop Entry]\nEncoding=UTF-8\nExec=$HOME/.eimza/eimza.sh\nName=E-imza\nGenericName=E-imza\nType=Application\nTerminal=false
StartupNotify=false\nType=Application\nIcon=$HOME/.eimza/e-imza-icon64.png\nCategories=Office" >> $HOME/.local/share/applications/eimza.desktop
