Browse Source

return instead of exit

main
pvincent 2 weeks ago
parent
commit
226605d298
  1. 18
      install.sh

18
install.sh

@ -67,17 +67,17 @@ function sudo_root {
## MAIN ## MAIN
set -Eeuo pipefail set -Eeuo pipefail
assert_supported_distro
assert_bash
sudo_root
if [[ ! -v MIAOU_BASH_DIR ]]; then
if assert_supported_distro && assert_bash && sudo_root; then
if [[ ! -v MIAOU_BASH_DIR ]]; then
MIAOU_BASH_DIR=/opt/miaou-bash MIAOU_BASH_DIR=/opt/miaou-bash
export MIAOU_BASH_DIR export MIAOU_BASH_DIR
fi
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
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 exec bash -l
fi
else
>&2 echo "MIAOU_BASH_ERROR: requirements failure"
fi fi
Loading…
Cancel
Save