Files
dotfiles/bin/toolbox-recreate
2021-12-27 15:23:09 +01:00

65 lines
1.8 KiB
Bash
Executable File

#!/bin/bash
RELEASE=${1:-$(. /lib/os-release && echo $VERSION_ID)}
NAME="fedora-toolbox-${RELEASE}"
bold=$(tput bold)
reset=$(tput sgr0)
info() {
echo "${bold}$1${reset}"
}
packages=(
## basic
'zsh' 'git' 'neovim' 'wl-clipboard' 'ranger' 'tmux' 'sqlite' 'ripgrep' 'fd-find' 'hyperfine'
## ansible
'ansible' 'openssh'
## C and compiling
'@C Development Tools and Libraries'
## golang
'golang' 'golang-x-tools-goimports' 'upx'
## haskell
#'haskell-platform'
## shell
'ShellCheck'
## pandoc
#'pandoc' 'perl-Image-ExifTool' 'ruby' 'ruby-devel' 'texlive'
#'texlive-collection-fontsextra' 'texlive-collection-formatsextra' 'texlive-collection-langenglish'
#'texlive-collection-langgerman' 'texlive-collection-latexextra' 'texlive-collection-science' 'wkhtmltopdf'
## rust
'cargo' 'rust'
## header packages for compiling
'pulseaudio-libs-devel' 'libxcb-devel' 'ncurses-devel' 'dbus-devel' 'libgit2-devel' 'libssh2-devel'
'openssl-devel'
## python
'python-requests' 'python-PyMySQL' 'python-psycopg2'
## huami-token
'python3-pytest' 'python3-requests' 'python3-rich'
## Mattermost Sphinx
'python3-sphinx' 'python3-sphinx-tabs' 'python3-sphinx_rtd_theme' 'python3-myst-parser' 'python3-typing-extensions'
)
removals=(
'subversion'
)
info 'Deleting old toolbox ...'
podman stop -t 0 ${NAME}
toolbox rm -f ${NAME}
info 'Creating toolbox ...'
toolbox -y create -r ${RELEASE}
info 'Updating toolbox ...'
toolbox run sudo dnf upgrade -y
info 'Installing packages inside toolbox ...'
toolbox run sudo dnf install -y "${packages[@]}"
info 'Removing unused packages ...'
toolbox run sudo dnf remove -y "${removals[@]}"
info 'Removing unused dependencies ...'
toolbox run sudo dnf autoremove -y