Skip to content

Commit 51de4cc

Browse files
neohitokiricedric-anne
authored andcommitted
fix: replace Bash-specific lowercase/uppercase substitution with portable tr command
This change replaces the Bash-specific ${VAR,,} and ${VAR^^} syntax with a portable tr command. The original syntax is not supported by the default shell on macOS (which uses older versions of Bash or defaults to sh), causing the script to fail. Using tr ensures compatibility across Unix-like systems, including macOS.
1 parent e639b38 commit 51de4cc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

plugin.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ else
4444
fi
4545

4646
NAME=$(echo $1|tr -dc '[[:alpha:]]')
47-
LNAME=${NAME,,}
48-
UNAME=${NAME^^}
47+
LNAME=$(echo "$NAME" | tr '[:upper:]' '[:lower:]')
48+
UNAME=$(echo "$NAME" | tr '[:lower:]' '[:upper:]')
4949
VERSION=$2
5050
YEAR=$(date +%Y)
5151

0 commit comments

Comments
 (0)