#!/bin/bash #RELEASE=${1:-$(. /lib/os-release && echo $VERSION_ID)} RELEASE=36 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' ## 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=( 'mercurial' '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 -c ${NAME} run sudo dnf upgrade -y info 'Installing packages inside toolbox ...' toolbox -c ${NAME} run sudo dnf install -y "${packages[@]}" info 'Removing unused packages ...' toolbox -c ${NAME} run sudo dnf remove -y "${removals[@]}" info 'Removing unused dependencies ...' toolbox -c ${NAME} run sudo dnf autoremove -y