From 71e766e4aac12487cb1c71f6b3641d6e1897d91e Mon Sep 17 00:00:00 2001 From: ElXreno Date: Tue, 14 Apr 2020 09:29:44 +0300 Subject: [PATCH] Little installer improvments `set -e` enables exit when received non-zero exit code --- install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install.sh b/install.sh index 077ffa7..cdbb87f 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,7 @@ #!/bin/sh +set -e + if [ $EUID != 0 ]; then sudo "$0" "$@" exit $? @@ -10,6 +12,7 @@ CONFIG=$1 if [ -z "$CONFIG" ] then echo "path to config to use as configuration.nix needs to be passed as first argument" + exit 1 else echo "using configuration: '$CONFIG'" fi