2014-09-02 16:25:26 +02:00
|
|
|
#!/bin/bash
|
2014-12-01 17:01:47 +01:00
|
|
|
TEXTDOMAIN=la-tools
|
|
|
|
TEXTDOMAINDIR=./
|
|
|
|
name="Dropbox"
|
|
|
|
|
2014-09-04 17:19:43 +02:00
|
|
|
if dpkg -l | grep dropbox | grep ii
|
2014-09-02 16:25:26 +02:00
|
|
|
then
|
2014-12-01 17:01:47 +01:00
|
|
|
echo $"$name is already installed"
|
|
|
|
zenity --info --title $"Information" --text $"$name is already installed"
|
2014-09-02 16:25:26 +02:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
sources=$(cat /etc/apt/sources.list.d/dropbox.list)
|
|
|
|
if [ "$sources" != "deb http://linux.dropbox.com/debian wheezy main" ]
|
|
|
|
then
|
|
|
|
echo "deb http://linux.dropbox.com/debian wheezy main" > temp
|
|
|
|
mv temp /etc/apt/sources.list.d/geogebra.list
|
|
|
|
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5044912E
|
|
|
|
rm temp
|
|
|
|
fi
|
|
|
|
apt-get update
|
|
|
|
if apt-get install dropbox -y
|
|
|
|
then
|
2014-12-01 17:01:47 +01:00
|
|
|
zenity --info --title $"Success" --text $"$name successfully installed"
|
2014-09-02 16:25:26 +02:00
|
|
|
else
|
2014-12-01 17:01:47 +01:00
|
|
|
zenity --error --title $"Error" --text $"An error occurred while installing $name"
|
2014-09-02 16:25:26 +02:00
|
|
|
fi
|