From 0a97df863b492d2eed8c5cea5bdc75372c1f5237 Mon Sep 17 00:00:00 2001 From: pvincent Date: Mon, 24 Aug 2026 16:19:53 +0400 Subject: [PATCH] assert_bash on install.sh --- install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install.sh b/install.sh index 8ca062e..7a40242 100755 --- a/install.sh +++ b/install.sh @@ -51,6 +51,13 @@ function execute_miaou_lib { sudo -E "$MIAOU_BASH_DIR"/bin/miaou-bash "$MIAOU_BASH_DIR"/lib/"$1".bash } +function assert_bash { + if [[ $SHELL != bash ]]; then + >&2 echo "you are running on SHELL=$SHELL. Bash expected!" + exit 98 + fi +} + function sudo_root { [[ "$UID" -ne 0 ]] && sudo -vp 'SUDO privilege required: ' true @@ -59,6 +66,7 @@ function sudo_root { set -Eeuo pipefail assert_supported_distro +assert_bash sudo_root if [[ ! -v MIAOU_BASH_DIR ]]; then