Created
August 4, 2010 22:45
-
-
Save RyanScottLewis/508932 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IFS="|" | |
#===--- | |
( | |
echo "1" | |
testconnection=`wget --tries=3 --timeout=15 www.google.com -O /tmp/testinternet &>/dev/null 2>&1` | |
if [ $? != 0 ]; then | |
echo "#Internet Connection: Not connected" | |
else | |
echo "#Internet Connection: Connected" | |
fi | |
) | zenity --title="Checking Internet Connection" \ | |
--text="Internet Connection: Checking..." \ | |
--width=350 \ | |
--progress --pulsate | |
if [ $? = 1 ]; then | |
exit | |
fi | |
#===--- | |
sudo -k | |
zenity --entry --hide-text \ | |
--width=350 \ | |
--title="Root Password" \ | |
--text="Enter your root password:" | sudo -S -v | |
if [ "$?" != 0 ]; then | |
zenity --error --text="Sorry, bad password" | |
exit | |
fi | |
#===--- | |
choices=`/usr/bin/zenity \ | |
--list --checklist \ | |
--width=275 --height=350 \ | |
--title="Select Applications" \ | |
--text "What would you like to do?" \ | |
--column "" --column "Actions" \ | |
TRUE "Install Dropbox" \ | |
TRUE "Install VLC" \ | |
TRUE "Install Deluge" \ | |
TRUE "Install Ruby Version Manager" \ | |
TRUE "Install Guake" \ | |
TRUE "Install Ubuntu Tweak" \ | |
TRUE "Install Compiz Settings Manager" \ | |
TRUE "Install Chromium" \ | |
TRUE "Install Extra Themes"` | |
#===--- | |
if [ "$choices" = "" ]; then | |
question=`zenity --question --text="Would you like to exit?"` | |
if [ $? -eq 0 ]; then | |
exit | |
fi | |
else | |
for choice in $choices; do | |
if [ "$choice" = "Install Dropbox" ]; then | |
sources="$sources|ppa:nautilus-dropbox/ppa" | |
apps="$apps|nautilus-dropbox" | |
elif [ "$choice" = "Install Chromium" ]; then | |
sources="${sources}|ppa:chromium-daily/ppa" | |
apps="${apps}|chromium-browser" | |
elif [ "$choice" = "Install VLC" ]; then | |
sources="${sources}|ppa:c-korn/ppa" | |
apps="${apps}|vlc" | |
elif [ "$choice" = "Install Deluge" ]; then | |
sources="${sources}|ppa:deluge-team/ppa" | |
apps="${apps}|deluge-torrent" | |
elif [ "$choice" = "Install Extra Themes" ]; then | |
sources="${sources}|ppa:bisigi/ppa" | |
apps="${apps}|bisigi-themes|community-themes" | |
elif [ "$choice" = "Install Ubuntu Tweak" ]; then | |
sources="${sources}|ppa:tualatrix/ppa" | |
apps="${apps}|ubuntu-tweak" | |
elif [ "$choice" = "Install Ruby Version Manager" ]; then | |
sources="${sources}|ppa:git-core/ppa" | |
apps="${apps}|rvm" | |
elif [ "$choice" = "Install Guake" ]; then | |
apps="${apps}|guake" | |
elif [ "$choice" = "Install Compiz Settings Manager" ]; then | |
apps="${apps}|compizconfig-settings-manager|compiz-fusion-plugins-extra" | |
fi | |
done | |
#===--- | |
( | |
echo "1" | |
for source in $sources; do | |
echo "#Adding source $source..." | |
sudo add-apt-repository $source | |
done | |
echo "#Updating sources..." | |
sudo apt-get update >&2 | |
echo "#Preforming dist-upgrade..." | |
sudo apt-get dist-upgrade >&2 | |
echo "#Upgrading packages..." | |
sudo apt-get upgrade >&2 | |
for app in $apps; do | |
if [ $app = "rvm" ]; then | |
echo "#Installing git-core..." | |
sudo apt-get install git-core | |
echo "#nInstalling Ruby Version Manager..." | |
mkdir -p ~/.rvm/src/ | |
cd ~/.rvm/src | |
rm -rf ./rvm | |
git clone --depth 1 git://github.com/wayneeseguin/rvm.git | |
cd rvm | |
./install >&1 | |
else | |
echo "#Installing $app..." | |
sudo apt-get install $app | |
fi | |
done | |
echo "#Done!" | |
) | zenity --title="Installing Applications" --text="Please wait..." --progress --pulsate --auto-kill | |
if [ $? = 1 ]; then | |
exit | |
fi | |
#===--- | |
echo -n "Cleaning up... " | |
sudo apt-get clean | |
echo "Done" | |
#===--- | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you are running as root or in a chroot environment then remove all of the
sudo
s