diff --git a/include/packages.inc.sh b/include/packages.inc.sh new file mode 100644 index 0000000..82c492a --- /dev/null +++ b/include/packages.inc.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +declare -A packages + +# install base desktop stuff +packages[base]="ttf-mscorefonts-installer fonts-ubuntu fonts-ubuntu-console +flatpak flatpak-xdg-utils linux-headers-amd64 plymouth build-essential +p7zip-full unrar unzip borgbackup borgmatic shotwell neofetch" + +# install gnome base +packages[gnome]="task-gnome-desktop task-german-desktop +gnome-shell-extension-manager gnome-tweaks gnome-shell-extensions +gnome-shell-extension-desktop-icons-ng gnome-shell-extension-dashtodock +gnome-shell-extension-appindicator gnome-shell-extension-system-monitor +gnome-shell-extension-panel-osd +yaru-theme-{gnome-shell,gtk,icon,sound,unity} +gnome-software-plugin-flatpak +brasero +thunderbird thunderbird-l10n-de" + +# install admin and dev tools +packages[admin]="htop iotop sysstat lm-sensors git mc vim btop btrfs-progs +curl wget debootstrap geany 'geany-plugin*' lnav mtr-tiny ncdu nmap ppp +pandoc pwgen remmina rsync screen socat stress strace tcpdump ufw" + +# install nice programs +packages[nice]="wine:i386 winetricks chromium dosbox gimp vlc barrier audacity +keepassxc audacious clementine nextcloud-desktop arduino qv4l2 guvcview +solaar steam-installer" + +# install games +packages[game]="openarena" + +# ham radio +packages[ham]="direwolf gqrx-sdr ax25-tools ax25-apps" diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..df93edc --- /dev/null +++ b/setup.sh @@ -0,0 +1,78 @@ +#!/bin/bash + +arguments="$@" + +# get the $packages Array +. include/packages.inc.sh + +# colors for colored output 8) +RED="\e[31m" +GREEN="\e[32m" +YELLOW="\e[33m" +ENDCOLOR="\e[0m" + +function message() { + case $1 in + warn) + MESSAGE_TYPE="${YELLOW}WARN${ENDCOLOR}" + ;; + error) + MESSAGE_TYPE="${RED}ERROR${ENDCOLOR}" + ;; + info|*) + MESSAGE_TYPE="${GREEN}INFO${ENDCOLOR}" + ;; + esac + + if [ "$1" == "info" ] || [ "$1" == "warn" ] || [ "$1" == "error" ] + then + MESSAGE=$2 + else + MESSAGE=$1 + fi + + echo -e "[${MESSAGE_TYPE}] $MESSAGE" +} + +error () +{ + message error "ERROR!!" + exit 1 +} + +### + +if [ -z "$arguments" ] +then + package_categories="${!packages[@]}" +else + package_categories="$@" +fi + +message warn "Do you want to install these categories?" +message warn "${YELLOW}$package_categories${ENDCOLOR}" +message warn "Type '${GREEN}yes${ENDCOLOR}' and hit [ENTER] to continue" +read -p "=> " continue +if [ "$continue" != "yes" ] +then + message error "Installation aborted." + exit 1 +fi + +message "Continue with installation..." + +# iterate through $packages +for i in $package_categories +do + message "Packages category: ${YELLOW}${i}${ENDCOLOR}" + message "Packages contained: " + message "${GREEN}${packages[$i]}${ENDCOLOR}" + + # in case of a specific category, do special things + case $i in + nice) + message warn "sudo dpkg --add-architecture i386" + message warn "sudo apt update" + ;; + esac +done