At last I've finished a Second Version of the Ubuntu Install Script! With this version, the user can choose which programs to install and which not to install. This version is aimed at Ubuntu Dapper, Kubuntu Dapper and Xubuntu Dapper. I would like some input on how to check which version of Ubuntu this script is run on and then pass this info to the script to choose which sources.list to use.
For this script to work, please download and decompress the tar.gz and run the script. I'm including the script and the sources.list file used by the script in this post. If you don't want to download the tar.gz file, then make a directory named config and place a text file named sources.list inside of it and put the code for the sources.list in it. then put the install script code inside of a text file name ubuntu-install-script-dapper-v2.sh.
NOTE: This Script is only Designed for Dapper at this time. Edgy will be supported in the next version hopefully.
Feel Free to distribute this Script and put it on your website. All I ask is the credits remain in the script
# /bin/bash
##
## This Script (C)2006 by Mark Reaves. Feel free to distribute this script in whole.
## Any modifications to this script are welcome BUT make notes as to any edits and
## inform me so maybe I can include it in this script officially. Email any errors
## bugs or other nasty things in this script to
[email protected]## Feel free to email me any suggestions also.
## This Scripts Version is Dapper Version 2
cd /
echo "Starting Install Script Dapper Version 2."
if [[ ! `whoami`=="root" ]]
then
echo "You must run this script as root!"
echo "Please use sudo or log in as root."
exit
fi
clear
cat<<_EOF_
Script Starting.
NOTE: This Script is ONLY for Ubuntu Dapper
Xubuntu Dapper and Kubuntu Dapper!
If you are using Edgy STOP NOW!
Greetings $USER! This script will install many
useful programs, audio/video codecs
and more! This script comes without
any promise of anything. If it messes up
your system, it's not my fault. If you
find a bug or get an error, email it to me
at
[email protected]_EOF_
read -p "Are you ready (yes or no)? " ANSWER
if [[ $ANSWER = yes ]]
then
echo "Ok, Let's proceed.";
else
echo "Too bad, exiting.";
exit
fi
clear
cat<<_EOF_
Do you have a Lexmark z25-z35 printer? If so answer yes
to install the drivers for it. You will still have to
setup the printer yourself. If you choose no, the install
of the rest of the programs will proceed.
_EOF_
read -p "(yes or no)? " ANSWER2
if [[ $ANSWER2 = yes ]]
then
echo "Ok, Let's proceed.";
echo "Prepairing drivers and installing. Please wait...";
cd $HOME;
mkdir lexmark-printer-driver;
cd lexmark-printer-driver;
wget http://www.downloaddelivery.com/srfilecache/CJLZ35LE-CUPS-2.0-1.TAR.GZ;
cp CJLZ35LE-CUPS-2.0-1.TAR.GZ lexz25z35-cups-2.0-1.tar.gz;
rm CJLZ35LE-CUPS-2.0-1.TAR.GZ;
tar -xvzf lexz25z35-cups-2.0-1.tar.gz;
tail -n +143 lexmarkz35-CUPS-2.0-1.gz.sh > install.tar.gz;
tar -xvzf install.tar.gz;
alien -t lexmarkz35-CUPS-2.0-1.i386.rpm;
alien -t z35llpddk-2.0-2.i386.rpm;
tar xvzf lexmarkz35-CUPS-2.0.tgz -C / ;
tar xvzf z35llpddk-2.0.tgz -C /;
ldconfig;
cd /usr/share/cups/model;
gunzip Lexmark-Z35-lxz35cj-cups.ppd.gz;
/etc/rc2.d/S19cupsys restart;
cd $HOME;
echo "Cleaning Up...";
rm -r $HOME/lexmark-printer-driver;
echo "Done! Now set up your printer using your";
echo "favorite printer setup program.";
else
echo "Proceeding...";
fi
echo "Making a Backup of your Repositories ..."
cp /etc/apt/sources.list /etc/apt/sources.listBAK
echo "Replacing sources.list ..."
cp config/sources.list /etc/apt/sources.list
echo "Updating GPG Keys..."
wget http://packages.freecontrib.org/ubuntu/plf/12B83718.gpg -O- | apt-key add -
echo "Updating apt-get..."
apt-get update
read -p "Do you want to install Java (yes or no)? " ANSWER
if [[ $ANSWER = yes ]]
then
apt-get --assume-yes install sun-java5-jre sun-java5-plugin;
update-alternatives --config java;
echo "Java install complete"
else
echo "Ok, Proceeding.";
fi
read -p "Do you want to install Flash (yes or no)? " ANSWER
if [[ $ANSWER = yes ]]
then
apt-get --assume-yes install flashplugin-nonfree;
echo "Flash install complete"
else
echo "Ok, Proceeding.";
fi
read -p "Do you want to install Multimedia Codecs (yes or no)? " ANSWER
if [[ $ANSWER = yes ]]
then
apt-get --assume-yes install gstreamer0.10-ffmpeg gstreamer0.10-gl gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse w32codecs;
echo "Multimedia Codecs install complete"
else
echo "Ok, Proceeding.";
fi
read -p "Do you want to install VLC Multimedia Player (yes or no)? " ANSWER
if [[ $ANSWER = yes ]]
then
apt-get --assume-yes install vlc vlc-plugin-* mozilla-plugin-vlc;
echo "VLC Multimedia Player install complete";
else
echo "Ok, Proceeding.";
fi
read -p "Do you want to install tools needed to compile sourcecode (yes or no)? " ANSWER
if [[ $ANSWER = yes ]]
then
apt-get --assume-yes install build-essential checkinstall alien;
echo "Alien Checkinstall and Sourcecode compiling tools install complete"
else
echo "Ok, Proceeding.";
fi
read -p "Do you want to install a Firewall Manager (yes or no)? " ANSWER
if [[ $ANSWER = yes ]]
then
apt-get --assume-yes install firestarter;
echo "Firestarter install complete"
else
echo "Ok, Proceeding.";
fi
read -p "Do you want to install a CD Burning Program (yes or no)? " ANSWER
if [[ $ANSWER = yes ]]
then
apt-get --assume-yes install gnomebaker;
echo "Gnomebaker install complete"
else
echo "Ok, Proceeding.";
fi
read -p "Do you want to install a HTML Editor (yes or no)? " ANSWER
if [[ $ANSWER = yes ]]
then
apt-get --assume-yes install quanta;
echo "Quanta install complete"
else
echo "Ok, Proceeding.";
fi
read -p "Do you want to install StreamRipper (yes or no)? " ANSWER
if [[ $ANSWER = yes ]]
then
apt-get --assume-yes install streamripper;
echo "StreamRipper install complete"
else
echo "Ok, Proceeding.";
fi
read -p "Do you want to install StreamTuner (yes or no)? " ANSWER
if [[ $ANSWER = yes ]]
then
apt-get --assume-yes install streamtuner;
echo "StreamTuner install complete"
else
echo "Ok, Proceeding.";
fi
read -p "Do you want to install an FTP Client (yes or no)? " ANSWER
if [[ $ANSWER = yes ]]
then
apt-get --assume-yes install gftp;
echo "GFTP install complete"
else
echo "Ok, Proceeding.";
fi
read -p "Do you want to install a BitTorrent Client (yes or no)? " ANSWER
if [[ $ANSWER = yes ]]
then
apt-get --assume-yes install bittornado bittornado-gui;
echo "BitTornado and BitTornado GUI install complete"
else
echo "Ok, Proceeding.";
fi
read -p "Do you want to install XMMS Audio Player (yes or no)? " ANSWER
if [[ $ANSWER = yes ]]
then
apt-get --assume-yes install xmms xmms-skins xmms-wma;
echo "XMMS WMA Plugin and Skins for XMMS install complete"
else
echo "Ok, Proceeding.";
fi
read -p "Do you want to install Kernel Sources (yes or no)? " ANSWER
if [[ $ANSWER = yes ]]
then
apt-get --assume-yes install kernel-package gcc libncurses5 libncurses5-dev libqt3-mt-dev bin86 gawk linux-kernel-devel ncurses-dev linux-source;
cd /usr/src;
tar --bzip2 -xvf linux-source-2.6.15.tar.bz2;
rm -f /usr/src/linux;
ln -s /usr/src/linux-source-2.6.15 /usr/src/linux;
rm /usr/src/linux-source-2.6.15.tar.bz2;
echo "Kernel Sources install complete"
else
echo "Ok, Proceeding.";
fi
echo "Program Install Complete..."
echo "Restoring Original sources.list..."
mv /etc/apt/sources.list /etc/apt/sources.list.custom
mv /etc/apt/sources.listBAK /etc/apt/sources.list
apt-get update
echo "sources.list Restore Complete!"
cd $HOME
echo "Install complete! Have fun!"
echo "Exiting Script."
## This sources.list file is included with the Ubuntu Xtra Install Script.
## To restore your old sources (if this was installed with the script)
## then rm /etc/apt/sources.list and
## mv /etc/apt/sources.listBAK /etc/apt/sources.list
deb http://us.archive.ubuntu.com/ubuntu/ dapper main restricted multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ dapper main restricted
deb http://us.archive.ubuntu.com/ubuntu/ dapper-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ dapper-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ dapper universe
deb-src http://us.archive.ubuntu.com/ubuntu/ dapper universe
deb http://us.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu dapper-security main restricted
deb-src http://security.ubuntu.com/ubuntu dapper-security main restricted
deb http://nightlies.videolan.org/build/dapper-i386 /
deb http://packages.freecontrib.org/ubuntu/plf dapper non-free free
deb-src http://packages.freecontrib.org/ubuntu/plf dapper non-free free
deb http://download.skype.com/linux/repos/debian/ stable non-free