]> git.proxmox.com Git - mirror_acme.sh.git/blobdiff - acme.sh
fix for solaris
[mirror_acme.sh.git] / acme.sh
diff --git a/acme.sh b/acme.sh
index 3c9ba003d067ee66cc87bc3a940a89dc36ddd44f..75efde4ccc9167fbc24bc105b4ebff6c730049e6 100755 (executable)
--- a/acme.sh
+++ b/acme.sh
@@ -923,11 +923,17 @@ _sed_i() {
   fi
 }
 
+if [ "$(echo abc | egrep -o b 2>/dev/null)" = "b" ]; then
+  __USE_EGREP=1
+else
+  __USE_EGREP=""
+fi
+
 _egrep_o() {
-  if _is_solaris; then
-    sed -n 's/.*\('"$1"'\).*/\1/p'
-  else
+  if [ "$__USE_EGREP" ]; then
     egrep -o "$1"
+  else
+    sed -n 's/.*\('"$1"'\).*/\1/p'
   fi
 }