#!/bin/sh # by Chris_(medico_2001) # for Klikit-Linux # based on a script written by Matt at TechyStuff.Info # GPL - September 2007 export XDIALOG_HIGH_DIALOG_COMPAT=1 DIALOG=Xdialog DIA=Xdialog clear $DIALOG --title "Klikit-Linux Wizard" \ --backtitle " Install Mozilla Sunbird Calendar " \ --radiolist "This wizard allows for easy installation/removal of the latest Mozilla Sunbird Calendar program in your Klikit-Linux system \n You will need an Internet connection to download this program" 25 75 0 \ "Install" "Install Mozilla Sunbird" on \ "Remove" "Remove Mozilla Sunbird after installation" off \ "Exit" "Close this wizard" off 2> /tmp/checklist.tmp.$$ retval=$? if [ $retval = 1 ]; then exit 0 fi choice=`cat /tmp/checklist.tmp.$$` rm -f /tmp/checklist.tmp.$$ # ----------------------------------- if [ "$choice" = "Install" ]; then xterm -e sudo killall synaptic apt-get dpkg adept ##This line downloads the tar.gz and saves it to your home folder. xterm -e wget -c http://mozilla.isc.org/pub/mozilla.org/calendar/sunbird/releases/0.5/linux-i686/en-US/sunbird-0.5.en-US.linux-i686.tar.gz ##This line extracts the tar.gz to your home directory. tar -xvf sunbird-0.5.en-US.linux-i686.tar.gz ##This line copies the newly extracted directory to your /etc/opt/ directory. xterm -e sudo cp -r ~/sunbird /opt/ ##This line removes the "temporary" files from your home folder. #rm -rf ~/sunbird-0.5.en-US.linux-i686.tar.gz #rm -rf ~/sunbird ##This line creates a symlink in /usr/bin, allowing you to run Sunbird by typing "sunbird" in terminal. xterm -e sudo ln -s /opt/sunbird/sunbird /usr/bin/sunbird ##This line adds a thunder.desktop file to /usr/share/applications/, adding an entry titled "Sunbird" to Applications-->Office echo "[Desktop Entry] Encoding=UTF-8 Name=Sunbird Comment=SunbirdCalendar GenericName=Calendar Exec=sunbird Terminal=false X-MultipleArgs=false Type=Application Icon=/opt/sunbird/icons/mozicon128.png Categories=Applications;Office; StartupNotify=true" > /tmp/sunbird.desktop xterm -e sudo cp -r /tmp/sunbird.desktop /usr/share/applnk/Office/ xterm -e sudo rm -rf /tmp/sunbird.desktop ##This line confirms the installation kdialog --title="klikit info" --msgbox "Mozilla Sunbird calendar was successfully installed" fi # ----------------------------------- if [ "$choice" = "Remove" ]; then xterm -e sudo killall synaptic apt-get dpkg adept xterm -e sudo rm -rf /tmp/sunbird.desktop xterm -e sudo rm -r /opt/sunbird xterm -e sudo rm -rf /usr/bin/sunbird xterm -e sudo rm -rf /usr/share/applnk/Office/sunbird.desktop kdialog --title="klikit info" --msgbox "Mozilla Sunbird calendar was successfully removed" fi # ----------------------------------- if [ "$choice" = "Exit" ]; then exit 0 fi exit 0