From b41f48bf142b549a41e3ea91a7e1e4a358720d12 Mon Sep 17 00:00:00 2001 From: "Allen, Timothy" Date: Thu, 20 Apr 2023 12:53:21 -0400 Subject: [PATCH] MacOS doesn't support Bash 4; use a different uppercase function. --- pyro.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyro.sh b/pyro.sh index 1277291..bd9fa36 100644 --- a/pyro.sh +++ b/pyro.sh @@ -85,8 +85,11 @@ function pyro_create() { if [ $2 = "--auto-create" ]; then echo "There is no venv called '${ACTIVE_NAME}'. Do you want to create it? (y/N) " read yes_no + + # Uppercase the first character of the input yes_no=${yes_no:0:1} - yes_no=${yes_no^^} + yes_no=`echo $yes_no | tr a-z A-Z` + if [ "$yes_no" != "Y" ]; then echo "Not creating the new venv '${ACTIVE_NAME}'." return