--- bin/neo4j-shell.orig 2018-02-07 19:48:06 UTC +++ bin/neo4j-shell @@ -39,7 +39,9 @@ build_classpath() { detect_os() { if uname -s | grep -q Darwin; then DIST_OS="macosx" - elif [[ -e /etc/gentoo-release ]]; then + elif uname -s | grep -q FreeBSD; then + DIST_OS="freebsd" + elif [[ -e /etc/gentoo-release ]]; then DIST_OS="gentoo" else DIST_OS="other" @@ -122,7 +124,10 @@ _find_java_home() { [[ "${JAVA_HOME:-}" ]] && return case "${DIST_OS}" in - "macosx") + "freebsd") + JAVA_HOME="%%JAVA_HOME%%" + ;; + "macosx") JAVA_HOME="$(/usr/libexec/java_home -v 1.8)" ;; "gentoo") @@ -138,9 +143,9 @@ _show_java_help() { _setup_calculated_paths() { if [[ -z "${NEO4J_HOME:-}" ]]; then - NEO4J_HOME="$(cd "$(dirname "$0")"/.. && pwd)" + NEO4J_HOME="$(cd "$(dirname "$0")"/../neo4j && pwd)" fi - : "${NEO4J_CONF:="${NEO4J_HOME}/conf"}" + : "${NEO4J_CONF:="${NEO4J_HOME}/../etc"}" readonly NEO4J_HOME NEO4J_CONF }