X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=scripts%2Fgrml-config.sh;h=b6cef67a2e493613502f4b550a994ea866c026e9;hb=HEAD;hp=d8a134b001a5f789dadd40ce8cba2e328a5bd88c;hpb=897ba1ee0baa438969238211b815f7ba437875ef;p=grml.org.git diff --git a/scripts/grml-config.sh b/scripts/grml-config.sh index d8a134b..b6cef67 100644 --- a/scripts/grml-config.sh +++ b/scripts/grml-config.sh @@ -1,8 +1,24 @@ #!/bin/sh + +set -e + # IMPORTANT: please note that you might override existing -# configuration files in the current working directory! => -wget -O .screenrc http://git.grml.org/f/grml-etc-core/etc/grml/screenrc_generic -wget -O .vimrc http://git.grml.org/f/grml-etc-core/etc/vim/vimrc -wget -O .zshrc http://git.grml.org/f/grml-etc-core/etc/zsh/zshrc -# optional: -# wget -O .zshrc.local http://git.grml.org/f/grml-etc-core/etc/skel/.zshrc +# configuration files in the current working directory! +if command -v wget >/dev/null 2>&1 ; then + wget -O .screenrc https://git.grml.org/f/grml-etc-core/etc/grml/screenrc_generic + wget -O .tmux.conf https://git.grml.org/f/grml-etc-core/etc/tmux.conf + wget -O .vimrc https://git.grml.org/f/grml-etc-core/etc/vim/vimrc + wget -O .zshrc https://git.grml.org/f/grml-etc-core/etc/zsh/zshrc + # optional: + # wget -O .zshrc.local https://git.grml.org/f/grml-etc-core/etc/skel/.zshrc +elif command -v curl >/dev/null 2>&1 ; then + curl -L -o .screenrc https://git.grml.org/f/grml-etc-core/etc/grml/screenrc_generic + curl -L -o .tmux.conf https://git.grml.org/f/grml-etc-core/etc/tmux.conf + curl -L -o .vimrc https://git.grml.org/f/grml-etc-core/etc/vim/vimrc + curl -L -o .zshrc https://git.grml.org/f/grml-etc-core/etc/zsh/zshrc + # optional: + # curl -L -o .zshrc.local https://git.grml.org/f/grml-etc-core/etc/skel/.zshrc +else + echo 'Error: neither wget nor curl available for retrieving configuration files.' >&2 + exit 1 +fi