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,6 @@
#! /bin/bash #! /bin/bash
# fail immediately on error
set -e
bash -c "apt update && apt dist-upgrade && \ bash -c "apt update && apt dist-upgrade && \
apt install bash-completion locales man mc elinks git zsh curl neovim byobu htop \ apt install bash-completion locales man mc elinks git zsh curl neovim byobu htop \

View file

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

View file

@ -1,4 +1,6 @@
#! /bin/sh #! /bin/sh
# fail immediately on error
set -e
# root part # root part
curl -RLSsf1 https://github.com/schtobia/bootstrap/raw/master/bootstrap-root.sh | sudo -SEH bash - curl -RLSsf1 https://github.com/schtobia/bootstrap/raw/master/bootstrap-root.sh | sudo -SEH bash -

View file

@ -1,4 +1,7 @@
#! /bin/bash #! /bin/bash
# fail immediately on error
set -e
[ "$UID" -ne 0 ] && { echo "You must run this script as root." >&2; exit 1; } [ "$UID" -ne 0 ] && { echo "You must run this script as root." >&2; exit 1; }
(DISTRO=$(lsb_release -is | tr '[A-Z]' '[a-z]'); curl -LSsf https://download.docker.com/linux/$DISTRO/gpg | apt-key add - && \ (DISTRO=$(lsb_release -is | tr '[A-Z]' '[a-z]'); curl -LSsf https://download.docker.com/linux/$DISTRO/gpg | apt-key add - && \
add-apt-repository "deb https://download.docker.com/linux/$DISTRO $(lsb_release -cs) stable" && \ add-apt-repository "deb https://download.docker.com/linux/$DISTRO $(lsb_release -cs) stable" && \