Merge remote-tracking branch 'origin/github/pr/45'
[grml.org.git] / scripts / grml-config.sh
1 #!/bin/sh
2
3 set -e
4
5 # IMPORTANT: please note that you might override existing
6 # configuration files in the current working directory!
7 if command -v wget >/dev/null 2>&1 ; then
8   wget -O .screenrc     https://git.grml.org/f/grml-etc-core/etc/grml/screenrc_generic
9   wget -O .tmux.conf    https://git.grml.org/f/grml-etc-core/etc/tmux.conf
10   wget -O .vimrc        https://git.grml.org/f/grml-etc-core/etc/vim/vimrc
11   wget -O .zshrc        https://git.grml.org/f/grml-etc-core/etc/zsh/zshrc
12   # optional:
13   # wget -O .zshrc.local https://git.grml.org/f/grml-etc-core/etc/skel/.zshrc
14 elif command -v curl >/dev/null 2>&1 ; then
15   curl -L -o .screenrc   https://git.grml.org/f/grml-etc-core/etc/grml/screenrc_generic
16   curl -L -o .tmux.conf  https://git.grml.org/f/grml-etc-core/etc/tmux.conf
17   curl -L -o .vimrc      https://git.grml.org/f/grml-etc-core/etc/vim/vimrc
18   curl -L -o .zshrc      https://git.grml.org/f/grml-etc-core/etc/zsh/zshrc
19   # optional:
20   # curl -L -o .zshrc.local  https://git.grml.org/f/grml-etc-core/etc/skel/.zshrc
21 else
22   echo 'Error: neither wget nor curl available for retrieving configuration files.' >&2
23   exit 1
24 fi