-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-packages.sh
executable file
·31 lines (28 loc) · 1.12 KB
/
install-packages.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
#!/bin/zsh
typeset -A packages
# suckless-tools = dmenu
# xloadimage = background-image and fill borders with background-color
# xscreensaver = lock workspace
packages=(xmonad 'xmonad xmobar suckless-tools xloadimage xscreensaver' colordiff colordiff screen "screen" "rxvt-unicode-256color" "rxvt-unicode-256color" git "git" "gnupg2" "gnupg2" "evolution" "evolution" "most" "most" keepassx keepassx vim vim exuberant-ctags exuberant-ctags "zathura" "zathura")
for package in ${(k)packages}
do
# This actually does not work if package was installed before
# and then removed... Should consider something else!
dpkg -s $package > /dev/null &> /dev/null
if [ $? -gt 0 ]
then
echo -n "$package is not installed. Do you want to install $package? [y/N]"
read install
if [ $install = "y" ]
then
# Install xmonad tiling window manager
sudo apt-get install ${(z)packages[$package]}
else
echo -n "Skipping $package.\n"
fi
fi
if [[ $? -eq 0 || $install -eq "y" ]]
then
# setup dotfiles here for $package ...
fi
done