assert_bash on install.sh

This commit is contained in:
pvincent
2026-08-24 16:19:53 +04:00
parent 44c53b5ecf
commit 0a97df863b
+8
View File
@@ -51,6 +51,13 @@ function execute_miaou_lib {
sudo -E "$MIAOU_BASH_DIR"/bin/miaou-bash "$MIAOU_BASH_DIR"/lib/"$1".bash 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 { function sudo_root {
[[ "$UID" -ne 0 ]] && sudo -vp 'SUDO privilege required: ' [[ "$UID" -ne 0 ]] && sudo -vp 'SUDO privilege required: '
true true
@@ -59,6 +66,7 @@ function sudo_root {
set -Eeuo pipefail set -Eeuo pipefail
assert_supported_distro assert_supported_distro
assert_bash
sudo_root sudo_root
if [[ ! -v MIAOU_BASH_DIR ]]; then if [[ ! -v MIAOU_BASH_DIR ]]; then