set -e option, so that we fail as early as possible

This commit is contained in:
Tobias Schmidl 2018-11-23 10:17:31 +01:00
parent ebc0610736
commit 13183254e1
4 changed files with 10 additions and 0 deletions

View file

@ -1,4 +1,7 @@
#! /bin/bash
# fail immediately on error
set -e
TMPDIR=$(mktemp -u -p "$HOME" -d dotfiles.XXXXX) && \
git clone --separate-git-dir="$HOME/.cfg" https://github.com/schtobia/dotfiles.git "$TMPDIR" && \
[ -r "$TMPDIR/.gitmodules" ] && cp -vi "$TMPDIR/.gitmodules" "$HOME"