The reinstall script that I use so succesfully has been amended by Markus Kalb, and his version is shown here, and will be in the git repo too'

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#!/bin/bash
#: Title            : reinstall-ubuntu
#: Date             : October 2013
#: Author           : Wayno [email protected], Markus Kalb http://www.markus-kalb.de
#: Version          : 1.5
#: Description      : to give the ability to reinstall ubuntu much faster
#: Options          : many, all prefixed with 'doit '
#: License          : GNU GPL 3.0 or later
####################################################

# quit does any processing before returning back from the script.
# here we are just exiting.
#
function quit {
exit
}

function doit {

#echo back to the terminal what we are trying to install

printf '\n'
echo 'installing: ' $1 $2
printf '\n'

sudo apt-fast -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

}

function removeit {

#echo back to the terminal what we are trying to remove 
#

printf '\n'
echo 'removing : ' $1 $2
printf '\n'
sudo apt-get remove  $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

}

function addppa {

#echo back to the terminal what we are trying to install
#

printf '\n'
echo 'adding ppa: ' $1 $2
printf '\n'
sudo add-apt-repository -y  $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

}

# adding apt-fast repo and installing it without using 
# new apt-fast based "doit". Better would be to change 
# "doit" to only use apt-fast if it is present! TODO
#
addppa ppa:apt-fast/stable

## doing one apt-get update after all addppa
sudo apt-get update -y

### getting the needed apt-fast 
sudo apt-get -y install apt-fast

# 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 rsync
doit ssh 
doit tmux
doit autossh 
doit synapse
#doit gtkrsync
#doit ntp
#doit vnstat
#doit mpd
#doit mpc
#doit ncmpcpp
#doit lxde
#doit deluge
doit zim
#doit clipit
#doit claws-mail
#doit chronicle
#doit firestarter
#doit grsync
#doit i3lock
#doit gpodder
#doit conky
#doit xpad
doit chromium-browser
doit krusader
doit numlockx
#doit lightdm
#doit lightdm-gtk-greeter
#doit lxlauncher
#doit logwatch
#doit bluefish
#doit pidgin
#doit gwhere
#doit uptimed
#doit lxtask
#doit xfmpc
#doit claws-mail
#doit claws-mail-plugins
#doit claws-mail-extra-plugins
#doit claws-mail-themes
#doit xpad
doit vlc
#doit claws-mail-themes
#doit xchat
#doit xfmpc
doit clementine
doit pdfchain
#doit downtimed
doit texmaker 
doit gummi
doit gedit-plugins
doit pdftk

#remove some stuff
removeit tracker
removeit overlay-scrollbar

## last but not least get the updates since last install iso was created
sudo apt-get dist-upgrade -y

# and we are done!
quit

As I don't use Ubuntu I have not tested it, but he says that it works very well. It needs to be saved to your /home/$USER/bin/ or anywhere in your executable path, like /usr/local/bin/.



Comments

comments powered by Disqus