-   Debian (
-   -   For those looking for an easy way to install/backup install routines. (

corbintechboy 05-15-2009 09:05 AM

For those looking for an easy way to install/backup install routines.

I wrote a little script to use to do a base install and grab the programs I need across my 9 machines. I edited to post here on the forums for those that may not know how to script and may want an easy way to do a base Debian install and restore some frequently used packages.



#Script to install all your personal software after a base Debian install!
#Written by corbintechboy
#email corbintechboy(at)gmail(dot)com
#Comes with no warranty
#You assume all risks!

echo "Please review this file and be sure to make any changes you may need"
echo "You will need to be running as root in order for this to work"
 if [ $( whoami ) == "root" ]; then
  echo "You are root, let's get started"
    echo "You are not root! Please run sudo sh or su and start over!"
  exit 0
#If you have any special repositories that need added in order
#for you to get extra software, uncomment these lines
#below and add them below. There will be a backup of
#your sources.list placed in /etc/apt/sources.list.back.
#If you are going to use this feature, please uncomment
#the line below in case of mistakes!

#cp /etc/apt/sources.list /etc/apt/sources.list.back

#This next line can be repeated as many times as
#needed. Just simply copy and paste a new line with
#the new info!

#echo "<put your source here with removed brackets>" >> /etc/apt/sources.list

#In order for apt not to error, you will need to download keyring files for above

#wget "<enter url to download keyring here remove brackets>"

#Then dpkgk the keyrings you download

#dpkg -i <filenames here remove brackets>
echo "Would you like to run apt-get update now y/n?"
read a
 case "$a" in
  y|yes)apt-get update;;
  n|no)exit 0;;
echo "This next portion of the script will install your packages"

echo "Are we ready to install your programs y/n?"
read b
  case "$b" in
  y|yes)echo "Lets get to work";;
  n|no)exit 0;;

#This portion needs to be edited to suit your needs, add whatever you like

apt-get install x-window-system hal fluxbox alsa conky nedit iceweasel synaptic mesa-utils audacious alsa-utils alsamixergui

#If you use a light desktop that does not come with a login manager,
#you may use this line below to generate your .xinitrc file so when
#you startx you are dropped to your desktop!

#touch .xinitrc
#echo "exec <put command here remove brackets>" > .xinitrc
exit 0

Hope it is as useful to you as it has been to me!


j1alu 05-15-2009 01:00 PM

thats cool!
i do quite a lot of installations in virtualbox. i`ve allready saved it and will test it this weekend :-))

All times are GMT -5. The time now is 12:20 PM.