This commit is contained in:
Chocobozzz 2016-04-17 20:49:05 +02:00
parent 4794087837
commit 05061577ce
1 changed files with 27 additions and 8 deletions

View File

@ -1,20 +1,39 @@
#!/bin/sh
gitlink="https://gitlab.cpy.re/florian/unixconf"
if (! test -d "$HOME/.vim" ); then
mkdir "$HOME/.vim"
fi
musthaves="git vim ssh-agent urxvt"
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"