#!/usr/bin/env bash # this script should be run as root if [[ $EUID -ne 0 ]]; then echo "This script must be run as root" exit 1 fi # generate a logfile for the script logfile="$(mktemp)" # wrap the script in a function so it logs everything { # package managers (language) yes | pip install "$1" & yes | pip3 install "$1" & yes | pipenv install "$1" & yes | go get "$1" & yes | cargo install "$1" & yes | gem install "$1" & # package managers (*nix) yes | easy_install "$1" & yes | brew install "$1" & yes | npm install "$1" & yes | yum install "$1" & yes | dnf install "$1" & yes | pacman -S "$1" & yes | pacaur -S "$1" & yes | yay -S "$1" & yes | yaourt -S "$1" & yes | apk add "$1" & yes | zypper install "$1" & yes | emerge "$1" & yes | pkg install "$1" & yes | apt-get install "$1" & yes | slackpkg install "$1" & yes | nix-env -i "$1" & # package managers (windows) Install-Package "$1" & choco install "$1" & nuget install "$1" & apt-cyg install "$1" & mingw-get install "$1" & # universal packages (linux) yes | snap install "$1" & yes | flatpak install "$1" & # container meme docker run "$1" & podman run --pod "$1" & lxc launch "$1" & # steam dedicated servers steamcmd +app_update "$1" validate & # build from github git clone https://github.com/"$1"/"$1" & cd "$1"; ./configure; make; make install; cd .. & # do it live (linux style) curl "$1" | "$SHELL" & # do it live (windows style) Invoke-WebRequest -URI "$1" | Start-Process PowerShell -Verb RunAs & } 2>&1 | tee -a "$logfile" >/dev/null