make cli usable on OpenBSD (#16462)

Signed-off-by: Aisha Tammy <aisha@bsd.ac>
Co-authored-by: Aisha Tammy <aisha@bsd.ac>
This commit is contained in:
A. Tammy 2023-07-07 02:58:41 -04:00 committed by GitHub
parent f62c5ea1d6
commit 497d08af1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 1 deletions

View file

@ -10,6 +10,10 @@ case "`uname`" in
FreeBSD) FreeBSD)
RESOLVED_NAME=`readlink -f "$0"` RESOLVED_NAME=`readlink -f "$0"`
;; ;;
OpenBSD)
RESOLVED_NAME=`readlink -f "$0"`
JAVA_HOME=`/usr/local/bin/javaPathHelper -h keycloak`
;;
Linux) Linux)
RESOLVED_NAME=`readlink -f "$0"` RESOLVED_NAME=`readlink -f "$0"`
;; ;;

View file

@ -58,6 +58,8 @@ public class OsUtil {
return new OsArch("osx", "x86_64"); return new OsArch("osx", "x86_64");
} else if (os.startsWith("freebsd")) { } else if (os.startsWith("freebsd")) {
return new OsArch("freebsd", arch); return new OsArch("freebsd", arch);
} else if (os.startsWith("openbsd")) {
return new OsArch("openbsd", arch);
} }
// unsupported platform // unsupported platform

View file

@ -10,6 +10,10 @@ case "`uname`" in
FreeBSD) FreeBSD)
RESOLVED_NAME=`readlink -f "$0"` RESOLVED_NAME=`readlink -f "$0"`
;; ;;
OpenBSD)
RESOLVED_NAME=`readlink -f "$0"`
JAVA_HOME=`/usr/local/bin/javaPathHelper -h keycloak`
;;
Linux) Linux)
RESOLVED_NAME=`readlink -f "$0"` RESOLVED_NAME=`readlink -f "$0"`
;; ;;

View file

@ -42,6 +42,8 @@ public class OsUtil {
return new OsArch("osx", "x86_64"); return new OsArch("osx", "x86_64");
} else if (os.startsWith("freebsd")) { } else if (os.startsWith("freebsd")) {
return new OsArch("freebsd", arch); return new OsArch("freebsd", arch);
} else if (os.startsWith("openbsd")) {
return new OsArch("openbsd", arch);
} }
// unsupported platform // unsupported platform

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
case "$(uname)" in case "$(uname)" in
CYGWIN*) CYGWIN*)
@ -12,6 +12,10 @@ case "$(uname)" in
FreeBSD) FreeBSD)
RESOLVED_NAME="$(readlink -f "$0")" RESOLVED_NAME="$(readlink -f "$0")"
;; ;;
OpenBSD)
RESOLVED_NAME="$(readlink -f "$0")"
JAVA_HOME="$(/usr/local/bin/javaPathHelper -h keycloak)"
;;
Linux) Linux)
RESOLVED_NAME="$(readlink -f "$0")" RESOLVED_NAME="$(readlink -f "$0")"
;; ;;

View file

@ -39,6 +39,8 @@ public class OsUtils {
return new OsArch("osx", "x86_64"); return new OsArch("osx", "x86_64");
} else if (os.startsWith("freebsd")) { } else if (os.startsWith("freebsd")) {
return new OsArch("freebsd", arch); return new OsArch("freebsd", arch);
} else if (os.startsWith("openbsd")) {
return new OsArch("openbsd", arch);
} }
// unsupported platform // unsupported platform