Simplify dirnames + support prehyphen dirs

This commit is contained in:
samy kamkar
2026-03-09 04:03:08 -07:00
parent d552692fb3
commit 48f6df1b40
17 changed files with 17 additions and 17 deletions
@@ -23,6 +23,6 @@ VMARG_LIST="${GHIDRA_JAVA_OPTIONS} ${GHIDRA_JSHELL_JAVA_OPTIONS} "
# contains the link you are calling (which is the best we can do on macOS), and the "echo" is the
# fallback, which doesn't attempt to do anything with links.
SCRIPT_FILE="$(readlink -f "$0" 2>/dev/null || readlink "$0" 2>/dev/null || echo "$0")"
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_FILE")" && pwd)"
SCRIPT_DIR="$(dirname -- "$SCRIPT_FILE")"
# Launch Ghidra
"${SCRIPT_DIR}"/launch.sh fg jdk Ghidra-JShell "${GHIDRA_JSHELL_MAXMEM}" "${VMARG_LIST}" ghidra.JShellRun "$@"