forked from andresgongora/synth-shell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
yaourt-setup.sh
executable file
·167 lines (115 loc) · 4.19 KB
/
yaourt-setup.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
#!/bin/sh
## Install basic packages using yaourt. Intended for first-time system setups
# PACKAGES TO INSTALL ----------------------------------------------------------------------
# BASIC SYSADMIN PACKAGES
terminal_packages="rsync atop htop iotop minicom tmux lm_sensors i2c_tools rar unrar 7zip netcat trash-cli ncdu tree nano"
# DESKTOP PACKAGES FOR MOST USERS
desktop_packages="redshift faience-icon-theme owncloud-client gparted nemo nemo-fileroller nemo-preview nemo-share ffmpeg ffmpegthumbnailer gparted gnome-disk-utility autokey-py3"
# WEB BROWSERS AND DOWNLOAD AGENTS
web_packages="firefox chromium flashplugin firefox-i18n-es-es teamspeak3 deluge"
# TEXT AND DOCUMENT PROCESSING TOOLS
office_packages="libreoffice-fresh mousepad gimp calibre kdegraphics-okular inkscape hunspell-en hunspell-es evince acroread acroread-fonts"
# MULTIMEDIA PLAYBACK SOFTARE
multimedia_packages="vlc audacious audacious-plugins smplayer"
# SOFTWARE DEVELOPMENT PACKAGES
development_packages="git gitg qtcreator otf-hack kicad kicad-library kicad-library-3d python python2 guake"
# BE SUDO ----------------------------------------------------------------------------------
sudo -v
# Keep-alive: update existing sudo time stamp if set, otherwise do nothing.
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# PERFORMANCE ------------------------------------------------------------------------------
echo "Remmeber to tweak MAKEFLAGS (add -j) in /etc/makepkg.conf"
read -r -p "Do you want to do that now? [y/N] " response
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]
then
sudo pacman -S --needed --noconfirm nano
sudo nano /etc/makepkg.conf
fi
# PROMNT USER ------------------------------------------------------------------------------
read -r -p "Install basic sysadmin packages? (Recommended) [Y/n] " response
if [[ $response =~ ^([nN][oO]|[nN])$ ]];
then
terminal=false
else
terminal=true
fi
read -r -p "Install basic desktop packages? (Recommended) [Y/n] " response
if [[ $response =~ ^([nN][oO]|[nN])$ ]];
then
desktop=false
else
desktop=true
fi
read -r -p "Install basic internet, web browser and communications packages? [Y/n] " response
if [[ $response =~ ^([nN][oO]|[nN])$ ]];
then
web=false
else
web=true
fi
read -r -p "Install basic office and image processing packages? [Y/n] " response
if [[ $response =~ ^([nN][oO]|[nN])$ ]];
then
office=false
else
office=true
fi
read -r -p "Install basic multimedia playback packages? [Y/n] " response
if [[ $response =~ ^([nN][oO]|[nN])$ ]];
then
multimedia=false
else
multimedia=true
fi
read -r -p "Install basic development packages? [Y/n] " response
if [[ $response =~ ^([nN][oO]|[nN])$ ]];
then
development=false
else
development=true
fi
# UPDATE SYSTEM ----------------------------------------------------------------------------
sudo pacman -Syu
read -r -p "Update mirrorlist? [y/N] " response
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]
then
sudo pacman -S --needed --noconfirm reflector
sudo cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
echo "/etc/pacman.d/mirrorlist moved to /etc/pacman.d/mirrorlist.backup"
echo "Creating new optimized mirrorlist with reflector"
sudo reflector -l 5 --sort rate --save /etc/pacman.d/mirrorlist
fi
#update all
sudo pacman -S --needed --noconfirm yaourt
yaourt -Syua --noconfirm
# INSTALL BASIC PACKAGES -------------------------------------------------------------------
if [ "$terminal" = true ]
then
yaourt -S --noconfirm --needed $terminal_packages
fi
if [ "$desktop" = true ]
then
yaourt -S --noconfirm --needed $desktop_packages
fi
if [ "$web" = true ]
then
yaourt -S --noconfirm --needed $web_packages
fi
if [ "$office" = true ]
then
yaourt -S --noconfirm --needed $office_packages
fi
if [ "$multimedia" = true ]
then
yaourt -S --noconfirm --needed $multimedia_packages
fi
if [ "$development" = true ]
then
yaourt -S --noconfirm --needed $development_packages
fi
# TWEAK PACMAN CHACHE ----------------------------------------------------------------------
echo "Clean PACMAN cache for better PACMAN performance in the future."
echo "Answer NO if you think you might want to revert any package back to a previously installed version."
sudo pacman -Sc
sudo pacman-optimize
# EOF