#!/bin/sh gitlink="https://gitlab.cpy.re/florian/unixconf/repository/archive.zip?ref=master" musthaves="zsh wget git vim ssh-agent urxvt unzip" for musthave in $musthaves; do which "$musthave" >/dev/null 2>&1 if [ "$?" -ne 0 ]; then echo "You should install ${musthave}." echo "On Debian: apt-get install zsh wget git vim openssh-client rxvt-unicode unzip" exit fi done # Vim setup if (! test -d "$HOME/.vim" ); then mkdir "$HOME/.vim" fi # ZSH setup sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" # Copy configurations tempdir="temp_$(date -I)" cd "$HOME" || exit mkdir "$tempdir" cd "$tempdir" || exit wget -O tempconf.zip "$gitlink" unzip tempconf.zip rm tempconf.zip rootdir="$(ls)" cd "$rootdir/configurations" || exit cp .* "$HOME/" echo "Setting ZSH as default (/bin/zsh)." echo "exec zsh" >> "$HOME/.bashrc"