/[projects]/misc/scripts/ubuntu-base.sh
ViewVC logotype

Contents of /misc/scripts/ubuntu-base.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1001 - (show annotations) (download) (as text)
Fri Jul 23 19:58:52 2010 UTC (13 years, 9 months ago) by torben
File MIME type: application/x-sh
File size: 3441 byte(s)
added openvpn to list of basic ubuntu tools
1 #!/bin/bash
2
3
4
5
6 SEPERATORLINE="------------------------------------------------------------------"
7
8 check_medibuntu()
9 {
10 if [ -f /etc/apt/sources.list.d/medibuntu.list ] ; then
11 echo "Medibuntu is in place"
12 else
13 sudo wget http://www.medibuntu.org/sources.list.d/`lsb_release -cs`.list --output-document=/etc/apt/sources.list.d/medibuntu.list && sudo apt-get -q update && sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring && sudo apt-get -q update
14 fi
15 }
16
17 check_android()
18 {
19 FILE="/etc/udev/rules.d/51-android.rules"
20 if [ -f $FILE ] ; then
21 echo "Andoid udev rules is in place"
22 else
23 echo "Installing udev rules"
24 echo 'SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"' | sudo tee $FILE
25 sudo restart udev
26 fi
27 }
28
29 check_partner()
30 {
31 LINES=`grep -v "#" /etc/apt/sources.list | grep -v "deb-src" | grep partner | wc -l | awk '{print $1}'`
32
33 if [ "$LINES" == "0" ] ; then
34 echo Please enable partner repository in /etc/apt/sources.list
35 exit 1
36 else
37 echo "Partner repository is enabled"
38 fi
39 }
40
41 error_exit()
42 {
43 echo "Error installing ...."
44 exit 1
45 }
46
47 inst()
48 {
49 PACKAGE="$*"
50 echo $SEPERATORLINE
51 echo "Installing: $PACKAGE"
52 echo $SEPERATORLINE
53 sudo apt-get -y install $PACKAGE || error_exit
54 }
55
56 function inst_java
57 {
58 inst sun-java6-jdk
59 sudo update-java-alternatives --set java-6-sun
60 sudo ln -s /usr/lib/jvm/java-6-sun/jre/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins/
61 }
62
63 remove()
64 {
65 PACKAGE="$*"
66 echo $SEPERATORLINE
67 echo "Remove: $PACKAGE"
68 echo $SEPERATORLINE
69 sudo apt-get -y --purge remove $PACKAGE || error_exit
70 }
71
72 autoremove()
73 {
74 echo $SEPERATORLINE
75 echo "autoremove'ing packages"
76 echo $SEPERATORLINE
77 sudo apt-get -y --purge autoremove
78 }
79
80 remove_orphans()
81 {
82 echo $SEPERATORLINE
83 echo "removing orphaned packages"
84 echo $SEPERATORLINE
85 deborphan | sudo xargs apt-get --purge -y remove
86 }
87
88
89 perform_clean()
90 {
91 echo $SEPERATORLINE
92 echo "cleaning"
93 echo $SEPERATORLINE
94 sudo apt-get clean
95 }
96
97
98 check_partner
99 check_medibuntu
100 check_android
101
102 sudo apt-get update || exit 0
103 sudo apt-get upgrade || exit 0
104
105 #totem sucks big time
106 remove totem totem-common
107 #gnome office packages sucks too
108 remove abiword abiword-common gnumeric gnumeric-common evolution
109
110 autoremove
111 remove_orphans
112
113 inst vim deborphan whois tree
114 inst openssh-server x11vnc rsync screen minicom tsclient xtightvncviewer
115 inst network-manager-openvpn
116 inst nfs-common
117 inst firefox firebug
118 inst flashplugin-nonfree
119 inst vlc mplayer
120 inst pavucontrol
121 #mozilla-mplayer
122 inst acroread
123
124 #inst gnochm #temporary disabled
125
126 #inst grip
127 inst_java
128 inst openoffice.org myspell-da
129 inst subversion libsvn-java rapidsvn git-core cvs
130 inst gimp vym umbrello dia inkscape gwenview
131 inst pgadmin3
132 inst pidgin xchat
133 inst wireshark nmap zenmap
134 inst filezilla krusader unrar
135 inst manpages-dev
136
137
138 #basic dev tools
139 inst gcc g++ cmake
140
141 #if [ "`hostname`" == "pumba" ] ; then
142 inst virtualbox-ose
143 inst k3b xsane
144 inst unetbootin audacity
145
146 ### dev tools
147 #inst kdevelop temporary
148 inst automake intltool libtool
149 inst libqt4-dev libwxgtk2.8-dev libncurses5-dev
150 inst libmysqlclient15-dev
151
152 ### gnome/gtk+ dev pkgs
153 inst libgtk2.0-dev libpango1.0-dev libxml2-dev
154
155 ### used for developing smsdaemon
156 inst libcurl4-openssl-dev libexpat1-dev
157
158 # inst tvtime
159 inst xubuntu-restricted-extras
160 ### change when gfx card is updated
161 #inst nvidia-glx-96
162 # inst nvidia-glx-185
163
164 #inst xserver-xorg-video-nouveau
165
166 #fi
167
168 #finally clean up the downloaded pkgs
169 perform_clean

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.20