From 7add9c1bea1745d4f6a08e2a15ccfce98760c135 Mon Sep 17 00:00:00 2001 From: Niema Moshiri Date: Sun, 2 Feb 2020 23:41:24 -0800 Subject: [PATCH] Improve script's flexibility wrt location As it was before, the script couldn't find the JAR file unless you ran the script in a folder containing the ``bin`` and ``lib`` directories. Now, as long as they're next to each other, it can find it regardless of where you call it (so you can add the ``figtree`` script to a directory in your ``PATH``) --- release/Linux/scripts/figtree | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/release/Linux/scripts/figtree b/release/Linux/scripts/figtree index 6dd9b68..37c6fbc 100755 --- a/release/Linux/scripts/figtree +++ b/release/Linux/scripts/figtree @@ -1,4 +1,2 @@ -#!/bin/sh - -java -Xms64m -Xmx512m -jar lib/figtree.jar "$@" - +#!/usr/bin/env bash +java -Xms64m -Xmx512m -jar "$(echo $0 | rev | cut -d'/' -f3- | rev)/lib/figtree.jar" "$@"