From 8a057295938f7c74f67d27844a85ef38004160a7 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 21 Feb 2024 18:03:20 -0500 Subject: [PATCH] Update build.func Check if the shell is using bash shell --- misc/build.func | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/misc/build.func b/misc/build.func index ace1a3e6..98b4a97f 100644 --- a/misc/build.func +++ b/misc/build.func @@ -82,6 +82,16 @@ check_root() { fi } +# Check if the shell is using bash +check_shell() { + if [[ "$(basename "$SHELL")" != "bash" ]]; then + msg_error "Your current shell is not Bash. To utilize these scripts, please switch to the Bash shell. + echo -e "\nExiting..." + sleep 2 + exit + fi +} + # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then