Add simple package bootstrap script
This commit is contained in:
parent
ae1a477301
commit
82d2e3079a
2 changed files with 211 additions and 0 deletions
91
.config/bootstrap/install
Executable file
91
.config/bootstrap/install
Executable 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 "$@"
|
120
.config/bootstrap/packages.csv
Normal file
120
.config/bootstrap/packages.csv
Normal 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
|
|
Loading…
Reference in a new issue