2014-02-22 17:44:45 +01:00
|
|
|
#!/bin/bash
|
2014-12-01 17:01:47 +01:00
|
|
|
TEXTDOMAIN=la-tools
|
|
|
|
TEXTDOMAINDIR=./
|
|
|
|
name="Geogebra"
|
|
|
|
|
2014-02-22 17:44:45 +01:00
|
|
|
apt-get update
|
2014-12-01 17:11:52 +01:00
|
|
|
if dpkg -l | grep geogebra5 | grep ii
|
2014-02-22 17:44:45 +01:00
|
|
|
then
|
2014-12-01 17:11:52 +01:00
|
|
|
if apt-get install geogebra5 -y
|
2014-02-22 17:44:45 +01:00
|
|
|
then
|
2014-12-01 17:01:47 +01:00
|
|
|
zenity --info --title $"Success" --text $"$name was successfully updated"
|
2014-02-22 17:44:45 +01:00
|
|
|
else
|
2014-12-01 17:01:47 +01:00
|
|
|
zenity --error --title $"Error" --text $"An error occurred while updating $name"
|
2014-02-22 17:44:45 +01:00
|
|
|
fi
|
|
|
|
exit
|
|
|
|
fi
|
2014-12-01 17:11:52 +01:00
|
|
|
apt-get purge geogebra geogebra44 -y
|
2014-02-22 17:44:45 +01:00
|
|
|
apt-get autoremove -y
|
|
|
|
sources=$(cat /etc/apt/sources.list.d/geogebra.list)
|
|
|
|
if [ "$sources" != "deb http://www.geogebra.net/linux/ stable main" ]
|
|
|
|
then
|
|
|
|
echo "deb http://www.geogebra.net/linux/ stable main" > temp
|
|
|
|
mv temp /etc/apt/sources.list.d/geogebra.list
|
|
|
|
wget -O - http://www.geogebra.net/linux/office@geogebra.org.gpg.key | sudo apt-key add -
|
|
|
|
rm temp
|
|
|
|
fi
|
|
|
|
if apt-get install geogebra44 -y
|
|
|
|
then
|
2014-12-01 17:01:47 +01:00
|
|
|
zenity --info --title $"Success" --text $"$name successfully installed"
|
2014-02-22 17:44:45 +01:00
|
|
|
else
|
2014-12-01 17:01:47 +01:00
|
|
|
zenity --error --title $"Error" --text $"An error occurred while installing $name"
|
2014-02-22 17:44:45 +01:00
|
|
|
fi
|