forked from snwh/ubuntu-post-install
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathubuntu-post-install-script-14.04.sh
executable file
·938 lines (917 loc) · 25.9 KB
/
ubuntu-post-install-script-14.04.sh
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
#!/bin/bash
# -*- Mode: sh; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
#
# Authors:
# Sam Hewitt <[email protected]>
#
# Description:
# A post-installation bash script for Ubuntu (14.04)
#
# Legal Stuff:
#
# This script is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; version 3.
#
# This script is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, see <https://www.gnu.org/licenses/gpl-3.0.txt>
echo ''
echo '#-------------------------------------------#'
echo '# Ubuntu 14.04 Post-Install Script #'
echo '#-------------------------------------------#'
#----- FUNCTIONS -----#
# SYSTEM UPGRADE
function sysupgrade {
# Perform system upgrade
echo ''
read -p 'Proceed with system upgrade? (Y)es, (N)o : ' REPLY
case $REPLY in
# Positive action
[Yy]* )
# Update repository information
echo 'Updating repository information...'
echo 'Requires root privileges:'
sudo apt-get update
# Dist-Upgrade
echo 'Performing system upgrade...'
sudo apt-get dist-upgrade -y
echo 'Done.'
main
;;
# Negative action
[Nn]* )
clear && main
;;
# Error
* )
clear && echo 'Sorry, try again.'
sysupgrade
;;
esac
}
# INSTALL APPLICATIONS
function favourites {
# Install Favourite Applications
echo ''
echo 'Installing selected favourite applications...'
echo ''
echo 'Current package list:
gnome-tweak-tool
gpick
nautilus-dropbox
nautilus-open-terminal
chromium-browser
'
echo ''
read -p 'Proceed? (Y)es, (N)o : ' REPLY
case $REPLY in
# Positive action
[Yy]* )
echo 'Requires root privileges:'
# Feel free to change to whatever suits your preferences.
sudo apt-get install -y --no-install-recommends gnome-tweak-tool gpick nautilus-dropbox nautilus-open-terminal chromium-browser
echo 'Done.'
main
;;
# Negative action
[Nn]* )
clear && main
;;
# Error
* )
clear && echo 'Sorry, try again.'
favourites
;;
esac
}
# INSTALL SYSTEM TOOLS
function system {
echo ''
echo '1. Install favourite system utilities?'
echo 'r. Return.'
echo ''
read -p 'What would you like to do? (Enter your choice) : ' REPLY
case $REPLY in
# Install Favourite System utilities
1)
echo 'Installing favourite system utilities...'
echo ''
echo 'Current package list:
aptitude
dconf-tools
openssh-server
p7zip-full
ppa-purge
ssh
symlinks
synaptic
zsync'
echo ''
read -p 'Proceed? (Y)es, (N)o : ' REPLY
case $REPLY in
# Positive action
[Yy]* )
echo 'Requires root privileges:'
# Feel free to change to whatever suits your preferences.
sudo apt-get install -y --no-install-recommends aptitude dconf-tools openssh-server p7zip-full ppa-purge ssh synaptic zsync
echo 'Done.'
clear && system
;;
# Negative action
[Nn]* )
clear && system
;;
# Error
* )
clear && echo 'Sorry, try again.'
system
;;
esac
;;
# Return
[Rr]*)
clear && main;;
# Invalid choice
* )
clear && echo 'Not an option, try again.' && development;;
esac
}
# INSTALL GNOME COMPONENTS
function gnome {
echo ''
echo '1. Add GNOME3 PPA?'
echo '2. Add GNOME3 Staging PPA?'
echo '3. Add GNOME3 Next PPA?'
echo '4. Install GNOME Shell?'
echo '5. Install extra GNOME components?'
echo '6. Configure GNOME Shell Specific Settings?'
echo 'r. Return.'
echo ''
read -p 'What would you like to do? (Enter your choice) : ' REPLY
case $REPLY in
# Add GNOME3 PPA
1)
# Add repository
echo 'Adding GNOME3 PPA to software sources...'
echo 'Requires root privileges:'
sudo add-apt-repository -y ppa:gnome3-team/gnome3
# Update repository information
echo 'Updating repository information...'
sudo apt-get update
# Upgrade system
echo 'Performing system upgrade...'
sudo apt-get dist-upgrade -y
echo 'Done.'
echo ''
gnome
;;
# Add GNOME3 Staging PPA
2)
# Add repository
echo 'Adding GNOME3 Staging PPA to software sources...'
echo 'Requires root privileges:'
sudo add-apt-repository -y ppa:gnome3-team/gnome3-staging
# Update repository information
echo 'Updating repository information...'
sudo apt-get update
# Upgrade system
echo 'Performing system upgrade...'
sudo apt-get dist-upgrade -y
echo 'Done.'
echo ''
gnome
;;
# Add GNOME3 Next PPA
3)
# Add repository
echo 'Adding GNOME3 Next PPA to software sources...'
echo 'Requires root privileges:'
sudo add-apt-repository -y ppa:gnome3-team/gnome3-next
# Update repository information
echo 'Updating repository information...'
sudo apt-get update
# Upgrade system
echo 'Performing system upgrade...'
sudo apt-get dist-upgrade -y
echo 'Done.'
echo ''
gnome
;;
# Install GNOME Shell
4)
echo 'Installing GNOME Shell...'
echo 'Requires root privileges:'
sudo apt-get install -y gnome-shell gnome-shell-extensions gnome-session
echo 'Done.'
echo ''
gnome
;;
# Install extra GNOME components
5)
echo 'Installing extra GNOME components...'
echo 'Requires the "gnome3-staging" and "gnome3-next" PPAs to be in the repositories.'
echo ''
echo 'Current package list:
cheese
gnome-boxes
gnome-maps
gnome-online-accounts
gnome-weather'
echo ''
read -p 'Proceed? (Y)es, (N)o : ' REPLY
case $REPLY in
# Positive action
[Yy]* )
echo 'Requires root privileges:'
# Feel free to change to whatever suits your preferences.
sudo apt-get install -y cheese gnome-boxes gnome-maps gnome-online-accounts gnome-weather
echo 'Done.'
clear && gnome
;;
# Negative action
[Nn]* )
clear && gnome
;;
# Error
* )
clear && echo 'Sorry, try again.'
gnome
;;
esac
;;
# Configure Shell Specific Settings
6)
# Font Settings
echo 'Setting font preferences...'
echo 'Requires the "Cantarell" font.'
# Check if "fonts-cantarell" package is installed
PACKAGE=$(dpkg-query -W --showformat='${Status}\n' fonts-cantarell | grep "install ok installed")
echo "Checking if installed..."
if [ "" == "$PACKAGE" ]; then
echo 'Cantarell is not installed.'
echo 'Installing... '
echo 'Requires root privileges:'
sudo apt-get install -y fonts-cantarell
echo 'Done. '
else
echo 'Cantarell is installed, proceeding... '
fi
# Settings font settings
gsettings set org.gnome.desktop.interface text-scaling-factor '1.0'
gsettings set org.gnome.desktop.interface document-font-name 'Cantarell 10'
gsettings set org.gnome.desktop.interface font-name 'Cantarell 10'
gsettings set org.gnome.nautilus.desktop font 'Cantarell 10'
gsettings set org.gnome.desktop.wm.preferences titlebar-font 'Cantarell Bold 10'
gsettings set org.gnome.settings-daemon.plugins.xsettings antialiasing 'rgba'
gsettings set org.gnome.settings-daemon.plugins.xsettings hinting 'slight'
echo 'Done. '
# GNOME Shell Settings
echo 'Setting GNOME Shell window button preferences...'
gsettings set org.gnome.shell.overrides button-layout ':close'
echo 'Done. '
echo ''
gnome
;;
# Return
[Rr]*)
clear && main;;
# Invalid choice
* )
clear && echo 'Not an option, try again.' && gnome;;
esac
}
# INSTALL UBUNTU RESTRICTED EXTRAS
function codecinstall {
echo ''
read -p 'Install Ubuntu Restricted Extras? (Y)es, (N)o : ' REPLY
case $REPLY in
# Positive action
[Yy]* )
echo 'Installing...'
echo 'Requires root privileges:'
sudo apt-get install -y ubuntu-restricted-extras
echo 'Done.'
main
;;
# Negative action
[Nn]* )
clear && main;;
# Error
* )
clear && echo 'Sorry, try again.' && codecinstall
esac
}
# INSTALL DEVELOPMENT TOOLS
function development {
echo ''
echo '1. Install development tools?'
echo '2. Install Ubuntu SDK?'
echo '3. Install Ubuntu Phablet Tools?'
echo 'r. Return'
echo ''
read -p 'What would you like to do? (Enter your choice) : ' REPLY
case $REPLY in
# Install Development Tools
1)
echo 'Installing development tools...'
echo ''
echo 'Current package list:
bzr
devscripts
git
gnome-common
vim-gnome
curl
zsh
mercurial
make
binutils
bison
gcc
build-essentials
nodejs'
echo ''
read -p 'Proceed? (Y)es, (N)o : ' REPLY
case $REPLY in
# Positive action
[Yy]* )
echo 'Requires root privileges:'
# Feel free to change to whatever suits your preferences.
sudo apt-get install -y bzr devscripts gcc-snapshot git lib32stdc++6 vim-gnome git curl zsh mercurial make binutils bison gcc build-essentials nodejs
echo 'Done.'
development
;;
# Negative action
[Nn]* )
clear && development
;;
# Error
* )
clear && echo 'Sorry, try again.'
development
;;
esac
;;
# Install Ubuntu SDK
2)
# Add repository
echo 'Adding Ubuntu SDK Team PPA to software sources...'
echo 'Requires root privileges:'
sudo add-apt-repository -y ppa:ubuntu-sdk-team/ppa
# Update repository information
echo 'Updating repository information...'
sudo apt-get update
# Install package(s)
echo 'Installing Ubuntu SDK...'
sudo apt-get install -y ubuntu-sdk
echo 'Done.'
development
;;
# Install Ubuntu Phablet Tools
3)
echo 'Installing Phablet Tools...'
sudo apt-get install -y phablet-tools
echo 'Done.'
development
;;
# Return
[Rr]*)
clear && main;;
# Invalid choice
* )
clear && echo 'Not an option, try again.' && development;;
esac
}
# INSTALL DESIGN TOOLS
function design {
echo ''
echo 'Installing design tools...'
echo ''
echo 'Current package list:
fontforge
fontforge-extras
gimp
gimp-plugin-registry
icontool
imagemagick
inkscape'
echo ''
read -p 'Proceed? (Y)es, (N)o : ' REPLY
case $REPLY in
# Positive action
[Yy]* )
echo 'Requires root privileges:'
# Feel free to change to whatever suits your preferences.
sudo apt-get install -y fontforge fontforge-extras gimp gimp-plugin-registry icontool imagemagick inkscape
echo 'Done.'
main
;;
# Negative action
[Nn]* )
clear && main;;
# Error
* )
clear && echo 'Sorry, try again.' && design
;;
esac
}
# THIRD PARTY THEMES
function themes {
echo 'What would you like to install? '
echo ''
echo '1. Moka Icon Theme'
echo '2. Faba Icon Theme'
echo '3. Moka GTK Theme'
echo '4. Moka GNOME Shell Theme'
echo '5. Orchis GTK Theme'
echo 'r. Return'
echo ''
read -p 'Enter your choice: ' REPLY
case $REPLY in
# Moka Icon Theme
1)
# Add repository
echo 'Adding Moka Icon Theme repository to sources...'
echo 'Requires root privileges:'
sudo add-apt-repository -y ppa:moka/moka-icon-theme
# Update repository information
echo 'Updating repository information...'
echo 'Requires root privileges:'
sudo apt-get update
# Install package(s)
echo 'Installing Moka icon themes...'
echo 'Requires root privileges:'
sudo apt-get install -y moka-icon-theme
echo 'Done.'
# Set Theme
read -p "Do you want to set Moka as desktop theme? (Y)es, (N)o : " INPUT
case $INPUT in
[Yy]* )
echo "Setting Moka as desktop Icon theme..."
gsettings set org.gnome.desktop.interface icon-theme "Moka"
echo "Done."
themes
;;
[Nn]* ) echo 'Done.'; themes;;
* ) echo; echo "Uh oh, invalid response. Continuing without changes."; themes;;
esac
themes
;;
# Faba Icon Theme
2)
# Add repository
echo 'Adding Faba Icon Theme repository to sources...'
echo 'Requires root privileges:'
sudo add-apt-repository -y ppa:moka/faba-icon-theme
# Update repository information
echo 'Updating repository information...'
echo 'Requires root privileges:'
sudo apt-get update
# Install package(s)
echo 'Installing Faba icon themes...'
echo 'Requires root privileges:'
sudo apt-get install -y faba-icon-theme faba-mono-icons faba-icon-theme-symbolic
echo 'Done.'
themes
;;
# Moka GTK Theme
3)
# Add repository
echo 'Adding Moka GTK Theme repository to sources...'
echo 'Requires root privileges:'
sudo add-apt-repository -y ppa:moka/moka-gtk-theme
# Update repository information
echo 'Updating repository information...'
echo 'Requires root privileges:'
sudo apt-get update
# Install package(s)
echo 'Installing Moka GTK theme...'
echo 'Requires root privileges:'
sudo apt-get install -y moka-gtk-theme
echo 'Done.'
# Set Theme
read -p "Do you want to set Moka as desktop theme? (Y)es, (N)o : " INPUT
case $INPUT in
[Yy]* )
echo "Setting Moka as GTK window theme..."
gsettings set org.gnome.desktop.wm.preferences theme "Moka"
echo "Done."
echo "Setting Moka as desktop GTK theme..."
gsettings set org.gnome.desktop.interface gtk-theme "Moka"
echo "Done."
themes
;;
[Nn]* ) echo 'Done.'; themes;;
* ) echo; echo "Uh oh, invalid response. Continuing without changes."; themes;;
esac
themes
;;
# Moka GNOME Shell Theme
4)
# Add repository
echo 'Adding Moka GNOME Shell Theme repository to sources...'
echo 'Requires root privileges:'
sudo add-apt-repository -y ppa:moka/moka-gnome-shell-theme
# Update repository information
echo 'Updating repository information...'
echo 'Requires root privileges:'
sudo apt-get update
# Install package(s)
echo 'Installing Moka GNOME Shell theme...'
echo 'Requires root privileges:'
sudo apt-get install -y moka-gnome-shell-theme
echo 'Done.'
themes
;;
# Orchis GTK Theme
5)
# Add repository
echo 'Adding Orchis GTK Theme repository to sources...'
echo 'Requires root privileges:'
sudo add-apt-repository -y ppa:moka/orchis-gtk-theme
# Update repository information
echo 'Updating repository information...'
echo 'Requires root privileges:'
sudo apt-get update
# Install package(s)
echo 'Installing Orchis GTK theme...'
echo 'Requires root privileges:'
sudo apt-get install -y orchis-gtk-theme
echo 'Done.'
# Set Theme
read -p "Do you want to set Orchis as desktop theme? (Y)es, (N)o : " INPUT
case $INPUT in
[Yy]* )
echo "Setting Orchis as GTK window theme..."
gsettings set org.gnome.desktop.wm.preferences theme "Orchis"
echo "Done."
echo "Setting Orchis as desktop GTK theme..."
gsettings set org.gnome.desktop.interface gtk-theme "Orchis"
echo "Done."
themes
;;
[Nn]* ) echo 'Done.'; themes;;
* ) echo; echo "Uh oh, invalid response. Continuing without changes."; themes;;
esac
themes
;;
# Return
[Rr]*)
clear && customize;;
# Invalid choice
* )
clear && echo 'Not an option, try again.' && themes;;
esac
}
# CUSTOMIZATION
function customize {
echo ''
echo '1. Configure system?'
echo '2. Install Third-Party themes?'
echo 'r. Return'
echo ''
read -p 'What would you like to do? (Enter your choice) : ' REPLY
case $REPLY in
1) clear && config;; # System Configuration
2) clear && themes;; # Install Third-Party Themes
[Rr]*) clear && main;; # Return
* ) clear && echo 'Not an option, try again.' && customize;; # Invalid choice
esac
}
# THIRD PARTY APPLICATIONS
function thirdparty {
echo 'What would you like to install? '
echo ''
echo '1. Google Chrome?'
echo '2. Google Talk Plugin?'
echo '3. Google Music Manager?'
echo '4. Steam?'
echo '5. Sublime Text 3 (build 3059)?'
echo '6. Spotify client'
echo '7. Oh-My-Zsh'
echo '8. Spf13-vim'
echo '9. GVM & Go'
echo 'r. Return'
echo ''
read -p 'Enter your choice: ' REPLY
case $REPLY in
# Google Chrome
1)
echo 'Downloading Google Chrome...'
# Download Debian file that matches system architecture
if [ $(uname -i) = 'i386' ]; then
wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb
elif [ $(uname -i) = 'x86_64' ]; then
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
fi
# Install package(s)
echo 'Installing Google Chrome...'
echo 'Requires root privileges:'b
sudo dpkg -i google-chrome*.deb
sudo apt-get install -fy
# Cleanup and finish
rm google-chrome*.deb
cd
echo 'Done.'
thirdparty
;;
# Google Talk Plugin
2)
echo 'Downloading Google Talk Plugin...'
# Download Debian file that matches system architecture
if [ $(uname -i) = 'i386' ]; then
wget https://dl.google.com/linux/direct/google-talkplugin_current_i386.deb
elif [ $(uname -i) = 'x86_64' ]; then
wget https://dl.google.com/linux/direct/google-talkplugin_current_amd64.deb
fi
# Install package(s)
echo 'Installing Google Talk Plugin...'
echo 'Requires root privileges:'
sudo dpkg -i google-talkplugin_current*.deb
sudo apt-get install -fy
# Cleanup and finish
rm google-talkplugin_current*.deb
cd
echo 'Done.'
thirdparty
;;
# Google Music Manager
3)
echo 'Downloading Google Music Manager...'
# Download Debian file that matches system architecture
if [ $(uname -i) = 'i386' ]; then
wget https://dl.google.com/linux/direct/google-musicmanager-beta_current_i386.deb
elif [ $(uname -i) = 'x86_64' ]; then
wget https://dl.google.com/linux/direct/google-musicmanager-beta_current_amd64.deb
fi
# Install package(s)
echo 'Installing Google Music Manager...'
echo 'Requires root privileges:'
sudo dpkg -i google-musicmanager-*.deb
sudo apt-get install -fy
# Cleanup and finish
rm google-musicmanager*.deb
cd
echo 'Done.'
thirdparty
;;
# Steam
4)
echo 'Downloading Steam...'
cd $HOME/Downloads
# Download Debian file that matches system architecture
if [ $(uname -i) = 'i386' ]; then
wget http://repo.steampowered.com/steam/archive/precise/steam_latest.deb
elif [ $(uname -i) = 'x86_64' ]; then
wget http://repo.steampowered.com/steam/archive/precise/steam_latest.deb
fi
# Install package(s)
echo 'Installing Steam...'
echo 'Requires root privileges:'
sudo dpkg -i steam*.deb
sudo apt-get install -fy
# Cleanup and finish
rm steam*.deb
cd
echo 'Done.'
thirdparty
;;
# Sublime Text 3 (build 3059)
5)
echo 'Downloading Sublime Text 3 (build 3059)...'
# Download Debian file that matches system architecture
if [ $(uname -i) = 'i386' ]; then
wget http://c758482.r82.cf2.rackcdn.com/sublime-text_build-3059_i386.deb
elif [ $(uname -i) = 'x86_64' ]; then
wget http://c758482.r82.cf2.rackcdn.com/sublime-text_build-3059_amd64.deb
fi
# Install package(s)
echo 'Installing Sublime Text 3 (build 3059)...'
echo 'Requires root privileges:'
sudo dpkg -i sublime-text_build-3059*.deb
sudo apt-get install -fy
# Create symbolic link
echo 'Creating symbolic link...'
echo 'Requires root privileges:'
sudo ln -sf /opt/sublime_text/sublime_text /usr/bin/sublime
echo 'Done.'
# Cleanup and finish
rm sublime-text_build-3059*.deb
cd
echo 'Done.'
thirdparty
;;
# Spotify
6)
# Add repository
echo 'Adding Spotify repository to sources...'
echo 'Creating apt list file...'
touch spotify.list
echo "deb http://repository.spotify.com stable non-free" >> spotify.list
echo 'Moving spotify.list to /etc/apt/sources.list.d/'
echo 'Requires root privileges:'
sudo mv -f spotify.list /etc/apt/sources.list.d/
echo 'Done.'
# Update repository information
echo 'Adding repository key and updating repository information...'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 94558F59
sudo apt-get update
# Install package(s)
echo 'Installing Spotify client...'
sudo apt-get install -y spotify-client
echo 'Done.'
thirdparty
;;
# Oh-My-Zsh
7)
echo 'Installing Oh-My-Zsh'
sudo apt-get install -y zsh
wget --no-check-certificate http://install.ohmyz.sh -O - | sh
thirdparty
;;
# spf13-vim
8)
echo 'Installing spf13-vim'
sudo apt-get install -y curl gnome-vim
sh <(curl https://j.mp/spf13-vim3 -L)
thirdparty
;;
# GVM & Go
9)
sudo apt-get install -y curl git mercurial make binutils bison gcc build-essential
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
gvm install go1
gvm use go1 [--default]
thirdparty
;;
# Return
[Rr]*)
clear && main;;
# Invalid choice
* )
clear && echo 'Not an option, try again.' && thirdparty;;
esac
}
# CONFIG
function config {
echo ''
echo '1. Set preferred application-specific settings?'
echo '2. Show all startup applications?'
echo 'r. Return'
echo ''
read -p 'What would you like to do? (Enter your choice) : ' REPLY
case $REPLY in
# GSettings
1)
# Font Sizes
echo 'Setting font preferences...'
gsettings set org.gnome.desktop.interface text-scaling-factor '1.0'
gsettings set org.gnome.desktop.interface document-font-name 'Ubuntu 10'
gsettings set org.gnome.desktop.interface font-name 'Ubuntu 10'
gsettings set org.gnome.desktop.interface monospace-font-name 'Ubuntu Mono 11'
gsettings set org.gnome.nautilus.desktop font 'Ubuntu 10'
gsettings set org.gnome.desktop.wm.preferences titlebar-font 'Ubuntu Bold 9'
gsettings set org.gnome.settings-daemon.plugins.xsettings antialiasing 'rgba'
gsettings set org.gnome.settings-daemon.plugins.xsettings hinting 'slight'
# Unity Settings
echo 'Setting Unity preferences...'
gsettings set com.canonical.Unity.ApplicationsLens display-available-apps false
gsettings set com.canonical.unity-greeter draw-user-backgrounds true
gsettings set com.canonical.indicator.power icon-policy 'charge'
gsettings set com.canonical.Unity.Lenses remote-content-search 'none'
# Nautilus Preferences
echo 'Setting Nautilus preferences...'
gsettings set org.gnome.nautilus.preferences sort-directories-first true
# Rhythmbox Preferences
echo 'Setting Rhythmbox preferences...'
gsettings set org.gnome.rhythmbox.rhythmdb monitor-library true
gsettings set org.gnome.rhythmbox.sources browser-views 'artists-albums'
# Done
echo "Done."
config
;;
# Startup Applications
2)
echo 'Changing display of startup applications.'
echo 'Requires root privileges:'
cd /etc/xdg/autostart/ && sudo sed --in-place 's/NoDisplay=true/NoDisplay=false/g' *.desktop
cd
echo 'Done.'
config
;;
# Return
[Rr]*)
clear && main;;
# Invalid choice
* )
clear && echo 'Not an option, try again.' && config;;
esac
}
# CLEANUP SYSTEM
function cleanup {
echo ''
echo '1. Remove unused pre-installed packages?'
echo '2. Remove old kernel(s)?'
echo '3. Remove orphaned packages?'
echo '4. Remove leftover configuration files?'
echo '5. Clean package cache?'
echo 'r. Return?'
echo ''
read -p 'What would you like to do? (Enter your choice) : ' REPLY
case $REPLY in
# Remove Unused Pre-installed Packages
1)
echo 'Removing selected pre-installed applications...'
echo 'Requires root privileges:'
sudo apt-get purge landscape-client-ui-install ubuntuone-control-panel* overlay*
echo 'Done.'
cleanup
;;
# Remove Old Kernel
2)
echo 'Removing old Kernel(s)...'
echo 'Requires root privileges:'
sudo dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | grep -v linux-libc-dev | xargs sudo apt-get -y purge
echo 'Done.'
cleanup
;;
# Remove Orphaned Packages
3)
echo 'Removing orphaned packages...'
echo 'Requires root privileges:'
sudo apt-get autoremove -y
echo 'Done.'
cleanup
;;
# Remove residual config files?
4)
echo 'Removing leftover configuration files...'
echo 'Requires root privileges:'
sudo dpkg --purge $(COLUMNS=200 dpkg -l | grep '^rc' | tr -s ' ' | cut -d ' ' -f 2)
echo 'Done.'
cleanup
;;
# Clean Package Cache
5)
echo 'Cleaning package cache...'
echo 'Requires root privileges:'
sudo apt-get clean
echo 'Done.'
cleanup
;;
# Return
[Rr]*)
clear && main;;
# Invalid choice
* )
clear && echo 'Not an option, try again.' && cleanup;;
esac
}
# Quit
function quit {
read -p "Are you sure you want to quit? (Y)es, (N)o " REPLY
case $REPLY in
[Yy]* ) exit 99;;
[Nn]* ) clear && main;;
* ) clear && echo 'Sorry, try again.' && quit;;
esac
}
#----- MAIN FUNCTION -----#
function main {
echo ''
echo '1. Perform system update & upgrade?'
echo '2. Install favourite applications?'
echo '3. Install favourite system utilities?'
echo '4. Install development tools?'
echo '5. Install design tools?'
echo '6. Install extra GNOME components?'
echo '7. Install Ubuntu Restricted Extras?'
echo '8. Install third-party applications?'
echo '9. Customize system?'
echo '10. Cleanup the system?'
echo 'q. Quit?'
echo ''
read -p 'What would you like to do? (Enter your choice) : ' REPLY
case $REPLY in
1) sysupgrade;; # System Upgrade
2) clear && favourites;; # Install Favourite Applications
3) clear && system;; # Install Favourite Tools
4) clear && development;; # Install Dev Tools
5) clear && design;; # Install Design Tools
6) clear && gnome;; # Install GNOME components
7) clear && codecinstall;; # Install Ubuntu Restricted Extras
8) clear && thirdparty;; # Install Third-Party Applications
9) clear && customize;; # Customize system
10) clear && cleanup;; # Cleanup System
[Qq]* ) echo '' && quit;; # Quit
* ) clear && echo 'Not an option, try again.' && main;;
esac
}
#----- RUN MAIN FUNCTION -----#
main
#END OF SCRIPT