1
0
Fork 0
mirror of https://github.com/Findus23/la-tools.git synced 2024-08-27 19:52:15 +02:00
la-tools/geogebra44.sh

33 lines
990 B
Bash
Raw Normal View History

2014-02-22 17:44:45 +01:00
#!/bin/bash
2014-12-01 17:01:47 +01:00
TEXTDOMAIN=la-tools
TEXTDOMAINDIR=./
2014-12-01 19:15:05 +01:00
name="Geogebra 4"
2014-12-01 20:15:04 +01:00
./apt-update.sh
2014-12-01 18:58:50 +01:00
sudo apt-get update
2014-12-01 17:11:52 +01:00
if dpkg -l | grep geogebra44 | grep ii
2014-02-22 17:44:45 +01:00
then
2014-12-01 18:58:50 +01:00
if sudo apt-get install geogebra44 -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 18:58:50 +01:00
sudo apt-get purge geogebra geogebra5 -y
sudo apt-get autoremove -y
2014-02-22 17:44:45 +01:00
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
2014-12-01 18:46:30 +01:00
sudo mv temp /etc/apt/sources.list.d/geogebra.list
2014-02-22 17:44:45 +01:00
wget -O - http://www.geogebra.net/linux/office@geogebra.org.gpg.key | sudo apt-key add -
rm temp
fi
2014-12-01 18:58:50 +01:00
if sudo apt-get install geogebra44 -y
2014-02-22 17:44:45 +01:00
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