#!/bin/bash function repository { add-apt-repository -y ppa:ultradvorka/ppa add-apt-repository -y ppa:webupd8team/java } function update-upgrade { apt-get update -y apt-get upgrade -y } function common { # default shell apt-get install -y sudo tmux mc tree pv vim mosh # shell apt-get install -y hh zsh grep HH_CONFIG /etc/bash.bashrc || hh --show-configuration >> /etc/bash.bashrc sed 's/\/bin\/bash/\/bin\/zsh/' /etc/passwd > /etc/passwd.new mv /etc/passwd.new /etc/passwd wget -O /etc/zsh/newuser.zshrc.recommended http://git.grml.org/f/grml-etc-core/etc/zsh/zshrc cp /etc/zsh/newuser.zshrc.recommended /root/.zshrc # diagnostics apt-get install -y htop iotop iftop nmon powertop stress lm-sensors # versioning apt-get install -y git git-gui subversion libapache2-svn # networking apt-get install -y nfs-common cifs-utils aircrack-ng openvpn axel wget ethtool mii-tool } function common-end { # configure system apt-get install -y console-data keyboard-configuration manpages-de sensors-detect } function client-gui { # programs apt-get install -y firefox firefox-locale-de thunderbird thunderbird-locale-de \ keepassx filezilla vlc gparted wireshark # IDE apt-get install -y eclipse # OpenJDK apt-get install -y openjdk-6-jdk openjdk-6-source openjdk-6-demo openjdk-6-doc \ openjdk-6-jre-headless openjdk-6-jre-lib apt-get install -y openjdk-7-jdk openjdk-7-source openjdk-7-demo openjdk-7-doc \ openjdk-7-jre-headless openjdk-7-jre-lib # Oracle Java apt-get install -y oracle-java7-installer oracle-java8-installer } function client-gui-end { # Java Plugin update-alternatives --config mozilla-javaplugin.so } function server-gui { # programs apt-get install -y firefox firefox-locale-de thunderbird thunderbird-locale-de \ keepassx filezilla vlc gparted wireshark # ssh apt-get install -y openssh-server } function server-cli { # ssh apt-get install -y openssh-server } if [[ $EUID -ne 0 ]]; then echo "This script must be run as root" 1>&2 exit 1 fi PS3='Please enter your system ' options=("client-gui" "server-cli" "server-gui" "Quit") select opt in "${options[@]}" do case $opt in "client-gui") repository update-upgrade common client-gui common-end client-gui-end break ;; "server-cli") repository update-upgrade common server-cli common-end break ;; "server-gui") repository update-upgrade common server-gui common-end break ;; *) echo invalid option;; esac done