assert_bash on install.sh
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user