One of the biggest complaints I have heard about doing a fresh install versus doing an upgrade on Linux, is that you have to re-install all the programmes. Yes. You do! But, generally a fresh install of a new release is far far less problematic then doing an update from one release to another.
We have simple rsync backup scripts.
This is a very simple bash script to re-install all the programmes.
Uses a couple of functions. quit – which does any necessary processing before the script ends. In this case it just exits. And doit function, which installs the programme from the repository.
Don’t use apt-get? No worries! Just change it to what you need, and it will work. Simple huh?
1. Here’s the script:
#!/bin/bash
#
# simple bash script to re-install all the programmes after a fresh install
# for debian/ubuntu
#
# Wayno Guerrini v1.0
#
# www.pkill-9.com
# quit does any processing before returning back from the script.
# here we are just exiting.
#
quit() {
exit
}
doit() {
#echo back to the terminal what we are trying to install
#
printf '\n'
echo 'installing: ' $1 $2
printf '\n'
sudo apt-get -y install $1
# $? is the return code from the previous command in this case the
# apt-get
retval=$?
# check the return code from the apt-get if it's okay, continue on,
# if it's not zero, tell me the return code, but continue on
if [ $retval -ne 0 ] ; then
echo '>>>>>failed rc =' $retval
fi
}
#
#
# okay re-install all the programmes after a fresh install -- note,
# if you don't want it, comment it out with a # in front
#
doit chromium-browser 'the chrome browser'
doit abiword 'the abiword wordprecessor'
doit akregator 'the akregator rss reader KDE'
# doit amarok 'the amrok mp3 player for KDE'
# doit autofs 'the automount software'
#doit bibletime 'the bible time software'
doit boinc 'the seti @ home software'
doit default-jre 'the default java runtime'
doit filezilla 'the filezilla ftp client'
doit flashplugin-nonfree 'the flash browser plugin'
doit gapcmon 'the graphical ups monitor apc'
doit gimp 'the photo/image processing'
doit googleearth-package 'the google earth'
doit grsync 'the graphical rsync'
doit guaydeque 'the guayadeque music player'
#doit hobbit-client 'the hobbit monitor client'
doit hplip-gui 'the hp printer gui'
doit ia32-libs 'the 32 bit share libraries/skype'
doit ia32-libs-gtk 'the 32 bit shared libs for gtk/skype'
doit icedtea6-plugin 'the java browser plugin'
doit k3b 'the k3b cd/dvd burning sftw KDE'
doit kontact 'the appt appt calendar KDE'
doit locate 'the file locater service'
doit mcrypt 'the mcrypt simple encryption'
doit mencoder 'the codecs transcoder'
doit mesa-utils 'the mesa utils -- glxgears'
doit nmap 'the network / port scanner tool'
doit ntpdate 'the network time protocol'
#doit nullidentd 'the dumb ident (port 113) server4 irc'
doit openssh-server 'the secure shell server'
#doit pidgin-facebookchat 'the fb/pidgin interface'
doit pidgin 'the pidgin instant msg client'
doit rcconf 'the boot up time configuration'
#doit rwho 'rwho/ruptime client'
doit screen 'the screen programme'
#doit thunderbird 'the thunderbird email client'
doit traceroute 'the traceroute command'
doit ttf-takao-mincho 'the japanese char set'
#doit ubuntu-restricted-extras the ubutnu specific extra codecs for mp3s'
doit ufw 'the unix firewall'
doit vinagre 'the remote viewer client'
doit vlc 'the vlc media player'
#doit vsftpd 'the very secure ftp server'
doit wine 'the windows emulator programme'
doit xinetd 'the extended internet daemon'
doit xsane 'the scanner programme'
doit xscreensaver 'the x screensaver for xwindows'
# and we are done!
quit
It consists of just the function name, and a brief description. It logs everything to the terminal, but it could easily be a appended to a file.
Use your favourite editor (mine is gedit) and just copy/paste the script. Save the script as re_install.sh
2. You must now make it executable.
sudo chmod +x re_install.sh
to run:
sudo sh re_install.sh
Wayno
Related Articles
No user responded in this post
Leave A Reply
Please Note: Comment moderation maybe active so there is no need to resubmit your comments