From 23ec84eef2baf8c21012bf80d79d4799fe326364 Mon Sep 17 00:00:00 2001 From: oddlama Date: Mon, 31 May 2021 17:20:06 +0200 Subject: [PATCH] Clarify configuration loading cases --- install | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/install b/install index 7a30e04..2998564 100755 --- a/install +++ b/install @@ -109,10 +109,10 @@ if [[ -z "$ACTION" ]]; then fi fi -if [[ -e "$CONFIG" ]]; then +if [[ "$ACTION" != "chroot" ]]; then # Load config if we aren't just chrooting - [[ "$ACTION" == "chroot" ]] \ - continue + [[ -e "$CONFIG" ]] \ + || die "Configuration file '$CONFIG' does not exist. To run the configurator, omit '-i' flag or run ./configure" # shellcheck disable=SC1090 source "$CONFIG" || die "Could not source config" @@ -120,8 +120,6 @@ if [[ -e "$CONFIG" ]]; then || die "You have not properly read the config. Edit the config file and set I_HAVE_READ_AND_EDITED_THE_CONFIG_PROPERLY=true to continue." preprocess_config -elif [[ "$ACTION" != "chroot" ]]; then - die "Configuration file '$CONFIG' does not exist. To run the configurator, omit '-i' flag or run ./configure" fi [[ $EUID == 0 ]] \