mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-07-15 17:42:59 +02:00
use _exiterr helper in a few more places
This commit is contained in:
+2
-6
@@ -52,18 +52,14 @@ load_config() {
|
|||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
. "${CONFIG}"
|
. "${CONFIG}"
|
||||||
else
|
else
|
||||||
echo "Specified config file doesn't exist." >&2
|
_exiterr "Specified config file doesn't exist."
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove slash from end of BASEDIR. Mostly for cleaner outputs, doesn't change functionality.
|
# Remove slash from end of BASEDIR. Mostly for cleaner outputs, doesn't change functionality.
|
||||||
BASEDIR="${BASEDIR%%/}"
|
BASEDIR="${BASEDIR%%/}"
|
||||||
|
|
||||||
# Check BASEDIR and set default variables
|
# Check BASEDIR and set default variables
|
||||||
if [[ ! -d "${BASEDIR}" ]]; then
|
[[ -d "${BASEDIR}" ]] || _exiterr "BASEDIR does not exist: ${BASEDIR}"
|
||||||
echo "BASEDIR does not exist: ${BASEDIR}" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Initialize system
|
# Initialize system
|
||||||
|
|||||||
Reference in New Issue
Block a user