]> git.proxmox.com Git - mirror_acme.sh.git/commitdiff
fix https://github.com/acmesh-official/acme.sh/issues/3806
authorneilpang <github@neilpang.com>
Sat, 13 Nov 2021 07:23:32 +0000 (15:23 +0800)
committerneilpang <github@neilpang.com>
Sat, 13 Nov 2021 07:23:32 +0000 (15:23 +0800)
acme.sh

diff --git a/acme.sh b/acme.sh
index 2786bbc5bc9ad630bd890bfb92a8078eb2ab26b9..d2e8b04d81f142be831eff8df0fb16a23f169ca7 100755 (executable)
--- a/acme.sh
+++ b/acme.sh
@@ -429,17 +429,27 @@ _secure_debug3() {
 }
 
 _upper_case() {
-  tr '[:lower:]' '[:upper:]'
+  if _is_solaris; then
+    tr '[:lower:]' '[:upper:]'
+  else
+    # shellcheck disable=SC2018,SC2019
+    tr 'a-z' 'A-Z'
+  fi
 }
 
 _lower_case() {
-  tr '[:upper:]' '[:lower:]'
+  if _is_solaris; then
+    tr '[:upper:]' '[:lower:]'
+  else
+    # shellcheck disable=SC2018,SC2019
+    tr 'A-Z' 'a-z'
+  fi
 }
 
 _startswith() {
   _str="$1"
   _sub="$2"
-  echo "$_str" | grep "^$_sub" >/dev/null 2>&1
+  echo "$_str" | grep -- "^$_sub" >/dev/null 2>&1
 }
 
 _endswith() {