return instead of exit
This commit is contained in:
+12
-12
@@ -67,17 +67,17 @@ function sudo_root {
|
||||
## MAIN
|
||||
|
||||
set -Eeuo pipefail
|
||||
assert_supported_distro
|
||||
assert_bash
|
||||
sudo_root
|
||||
if assert_supported_distro && assert_bash && sudo_root; then
|
||||
if [[ ! -v MIAOU_BASH_DIR ]]; then
|
||||
MIAOU_BASH_DIR=/opt/miaou-bash
|
||||
export MIAOU_BASH_DIR
|
||||
fi
|
||||
|
||||
if [[ ! -v MIAOU_BASH_DIR ]]; then
|
||||
MIAOU_BASH_DIR=/opt/miaou-bash
|
||||
export MIAOU_BASH_DIR
|
||||
fi
|
||||
|
||||
deployment_type_adjective="${1:-installed}" # `miaou-bash --self-upgrade` provides the 'upgrade' term
|
||||
if once_installed; then upgrade; else install; fi
|
||||
if [[ $deployment_type_adjective == 'installed' ]]; then
|
||||
exec bash -l
|
||||
deployment_type_adjective="${1:-installed}" # `miaou-bash --self-upgrade` provides the 'upgrade' term
|
||||
if once_installed; then upgrade; else install; fi
|
||||
if [[ $deployment_type_adjective == 'installed' ]]; then
|
||||
exec bash -l
|
||||
fi
|
||||
else
|
||||
>&2 echo "MIAOU_BASH_ERROR: requirements failure"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user