Update core.func
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
This commit is contained in:
parent
f333fc5db7
commit
435890eee2
@ -152,16 +152,15 @@ silent() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if the shell is using bash
|
|
||||||
# Check if the shell is using bash
|
# Check if the shell is using bash
|
||||||
shell_check() {
|
shell_check() {
|
||||||
local CURRENT_SHELL
|
local CURRENT_SHELL
|
||||||
CURRENT_SHELL="$(ps -p $$ -o comm=)"
|
CURRENT_SHELL="$(ps -p $$ -o comm= | xargs)" # trims whitespace
|
||||||
echo "DEBUG: Detected shell is: '$CURRENT_SHELL'"
|
echo "DEBUG: Detected shell is: '$CURRENT_SHELL'"
|
||||||
|
|
||||||
if [[ "$CURRENT_SHELL" != "bash" && "$CURRENT_SHELL" != "-bash" ]]; then
|
if [[ -z "$BASH_VERSION" ]]; then
|
||||||
clear
|
clear
|
||||||
msg_error "Your default shell is currently not set to Bash. To use these scripts, please switch to the Bash shell."
|
msg_error "This script requires bash, but current shell is: $CURRENT_SHELL"
|
||||||
echo -e "\nExiting..."
|
echo -e "\nExiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user