Add simple package bootstrap script

This commit is contained in:
Marty Oehme 2019-11-24 16:17:14 +01:00
parent ae1a477301
commit 82d2e3079a
2 changed files with 211 additions and 0 deletions

91
.config/bootstrap/install Executable file
View file

@ -0,0 +1,91 @@
#!/bin/bash
#
# Simple app bootstrapping script
#=== main function ============================================================
# NAME: main
# DESCRIPTION: Display usage information for this script.
# PARAMETERS: see usage function
#==============================================================================
main() {
local cmd=""
local ret=0
case "$1" in
-v | --version)
printf "Package bootstrap script.\n\n©Marty Oehme\n\nVersion: 0.1\n"
;;
-h | --help)
printf "Usage: install [-f|--force][-v|--version][-h|--help]\n\n-f Do not ask for any confirmations but force update and installation.\n"
;;
-f | --force)
install true
;;
*)
install false
;;
esac
shift
$cmd "$@"
ret=$((ret + $?))
exit $ret
}
install_yay() {
# check for existing yay installation
if type yay >/dev/null 2>&1; then
echo "Existing yay installation found ..........................................."
return
fi
# use tmp dir to make yay
target=$(mktemp -d)
git clone https://aur.archlinux.org/yay.git "$target"
cd "$target" || exit
makepkg -si
}
update_repos() {
unattended="$1"
if "$unattended"; then
yay -Sqyy --noconfirm
else
yay -Syy
fi
}
install_packages() {
unattended="$1"
if "$unattended"; then
yay -Squ --noconfirm --needed - <packages.csv
else
yay -Su --needed - <packages.csv
fi
}
check_consent() {
echo "This will take a while and install many packages. Proceed [y/N]?"
read -r yes
if [[ "$yes" != y* ]]; then
echo "Exiting."
exit
fi
}
install() {
unattended=$1
echo "Beginning boostrap ........................................................"
if ! "$unattended"; then
check_consent
fi
echo "Installing yay ............................................................"
install_yay
echo "Installing apps ..........................................................."
update_repos "$unattended"
install_packages "$unattended"
echo "Done ......................................................................"
}
main "$@"

View file

@ -0,0 +1,120 @@
alacritty
atool
bash
bibtool
bison
bzip2
chromium
dhcpcd
dialog
docker
exa
fasd
feh
flashfocus-git
fzf
gawk
git
gnome-keyring
gopass
grep
gzip
hugo
i3-gaps
i3blocks
i3lock
i3status
jabref-latest
keybase-bin
less
libtool
littler
logrotate
mopidy
mopidy-podcast
mopidy-scrobbler
mopidy-spotify
mopidy-spotify-tunigo
mosh
mpv
nano
neovim
nerd-fonts-fira-code
nerd-fonts-iosevka
nextcloud-client
nvidia
nvidia-utils
openssh
os-prober
pacman
pandoc
pandoc-citeproc
papis
picom
pkgconf
polybar
pulseaudio
pulseaudio-alsa
pulsemixer
python-pip
python-pybtex
python-pynvim
python-pywal
qutebrowser
r
redshift
ripgrep
rng-tools
rofi-calc
rofi-dmenu
rofi-greenclip
rofimoji
scrot
shellcheck-static
shfmt
surfraw
sxhkd
tar
texinfo
texlive-bibtexextra
texlive-core
texlive-fontsextra
texlive-formatsextra
texlive-games
texlive-humanities
texlive-latexextra
texlive-music
texlive-pictures
texlive-pstricks
texlive-publishers
texlive-science
tmux
tomb
topgrade
ttf-comic-neue
ttf-heuristica
ttf-signika
unclutter
unrar
unzip
vagrant
vifm
virtualbox
weechat
wget
which
xcape
xclip
xdg-user-dirs
xdotool
xorg-server
xorg-xev
xorg-xinit
xorg-xinput
xorg-xrandr
yarn
yay
youtube-dl
zathura
zathura-pdf-mupdf
zsh
1 alacritty
2 atool
3 bash
4 bibtool
5 bison
6 bzip2
7 chromium
8 dhcpcd
9 dialog
10 docker
11 exa
12 fasd
13 feh
14 flashfocus-git
15 fzf
16 gawk
17 git
18 gnome-keyring
19 gopass
20 grep
21 gzip
22 hugo
23 i3-gaps
24 i3blocks
25 i3lock
26 i3status
27 jabref-latest
28 keybase-bin
29 less
30 libtool
31 littler
32 logrotate
33 mopidy
34 mopidy-podcast
35 mopidy-scrobbler
36 mopidy-spotify
37 mopidy-spotify-tunigo
38 mosh
39 mpv
40 nano
41 neovim
42 nerd-fonts-fira-code
43 nerd-fonts-iosevka
44 nextcloud-client
45 nvidia
46 nvidia-utils
47 openssh
48 os-prober
49 pacman
50 pandoc
51 pandoc-citeproc
52 papis
53 picom
54 pkgconf
55 polybar
56 pulseaudio
57 pulseaudio-alsa
58 pulsemixer
59 python-pip
60 python-pybtex
61 python-pynvim
62 python-pywal
63 qutebrowser
64 r
65 redshift
66 ripgrep
67 rng-tools
68 rofi-calc
69 rofi-dmenu
70 rofi-greenclip
71 rofimoji
72 scrot
73 shellcheck-static
74 shfmt
75 surfraw
76 sxhkd
77 tar
78 texinfo
79 texlive-bibtexextra
80 texlive-core
81 texlive-fontsextra
82 texlive-formatsextra
83 texlive-games
84 texlive-humanities
85 texlive-latexextra
86 texlive-music
87 texlive-pictures
88 texlive-pstricks
89 texlive-publishers
90 texlive-science
91 tmux
92 tomb
93 topgrade
94 ttf-comic-neue
95 ttf-heuristica
96 ttf-signika
97 unclutter
98 unrar
99 unzip
100 vagrant
101 vifm
102 virtualbox
103 weechat
104 wget
105 which
106 xcape
107 xclip
108 xdg-user-dirs
109 xdotool
110 xorg-server
111 xorg-xev
112 xorg-xinit
113 xorg-xinput
114 xorg-xrandr
115 yarn
116 yay
117 youtube-dl
118 zathura
119 zathura-pdf-mupdf
120 zsh