replace backtick in kc.sh by $()

This commit is contained in:
Knut Sander 2022-05-20 17:37:36 +02:00 committed by Pedro Igor
parent 2cbbde499b
commit d5b3fb98d1

View file

@ -1,19 +1,19 @@
#!/bin/bash #!/bin/bash
case "`uname`" in case "$(uname)" in
CYGWIN*) CYGWIN*)
IS_CYGWIN="true" IS_CYGWIN="true"
CFILE=`cygpath "$0"` CFILE="$(cygpath "$0")"
RESOLVED_NAME=`readlink -f "$CFILE"` RESOLVED_NAME="$(readlink -f "$CFILE")"
;; ;;
Darwin*) Darwin*)
RESOLVED_NAME=`readlink "$0"` RESOLVED_NAME="$(readlink "$0")"
;; ;;
FreeBSD) FreeBSD)
RESOLVED_NAME=`readlink -f "$0"` RESOLVED_NAME="$(readlink -f "$0")"
;; ;;
Linux) Linux)
RESOLVED_NAME=`readlink -f "$0"` RESOLVED_NAME="$(readlink -f "$0")"
;; ;;
esac esac
@ -22,7 +22,7 @@ if [ "x$RESOLVED_NAME" = "x" ]; then
fi fi
GREP="grep" GREP="grep"
DIRNAME=`dirname "$RESOLVED_NAME"` DIRNAME="$(dirname "$RESOLVED_NAME")"
abs_path () { abs_path () {
if [ -z $IS_CYGWIN ] ; then if [ -z $IS_CYGWIN ] ; then
@ -36,7 +36,7 @@ SERVER_OPTS="-Dkc.home.dir='$(abs_path '..')'"
SERVER_OPTS="$SERVER_OPTS -Djboss.server.config.dir='$(abs_path '../conf')'" SERVER_OPTS="$SERVER_OPTS -Djboss.server.config.dir='$(abs_path '../conf')'"
SERVER_OPTS="$SERVER_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager" SERVER_OPTS="$SERVER_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
SERVER_OPTS="$SERVER_OPTS -Dquarkus-log-max-startup-records=10000" SERVER_OPTS="$SERVER_OPTS -Dquarkus-log-max-startup-records=10000"
CLASSPATH_OPTS="'"`abs_path "../lib/quarkus-run.jar"`"'" CLASSPATH_OPTS="'$(abs_path "../lib/quarkus-run.jar")'"
DEBUG_MODE="${DEBUG:-false}" DEBUG_MODE="${DEBUG:-false}"
DEBUG_PORT="${DEBUG_PORT:-8787}" DEBUG_PORT="${DEBUG_PORT:-8787}"
@ -97,7 +97,7 @@ fi
# Set debug settings if not already set # Set debug settings if not already set
if [ "$DEBUG_MODE" = "true" ]; then if [ "$DEBUG_MODE" = "true" ]; then
DEBUG_OPT=`echo "$JAVA_OPTS" | $GREP "\-agentlib:jdwp"` DEBUG_OPT="$(echo "$JAVA_OPTS" | $GREP "\-agentlib:jdwp")"
if [ "x$DEBUG_OPT" = "x" ]; then if [ "x$DEBUG_OPT" = "x" ]; then
JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=$DEBUG_PORT,server=y,suspend=$DEBUG_SUSPEND" JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=$DEBUG_PORT,server=y,suspend=$DEBUG_SUSPEND"
else else