Skip to content

Commit 2929211

Browse files
committed
Fixes #39 - Unable to follow symlinks.
Turns out that we were naively going up a directoryon a bash script. However, we should first find out where the bash script *really* is located, then go up a directory and take the real directory of that to find the installation. This is friendlier to our debian/rpm start scripts. Thanks to @muuki88 for diagnosing and proposing an alternative solution.
1 parent dc11fe1 commit 2929211

File tree

1 file changed

+2
-1
lines changed
  • src/main/resources/com/typesafe/sbt/packager/archetypes

1 file changed

+2
-1
lines changed

src/main/resources/com/typesafe/sbt/packager/archetypes/bash-template

+2-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ EOM
284284
declare -a residual_args
285285
declare -a java_args
286286
declare -a app_commands
287-
declare -r app_home="$(realpath "$(dirname "$0")")"
287+
declare -r real_script_path="$(realpath "$0")"
288+
declare -r app_home="$(realpath "$(dirname "$real_script_path")")"
288289
# TODO - Check whether this is ok in cygwin...
289290
declare -r lib_dir="$(realpath "${app_home}/../lib")"
290291
${{template_declares}}

0 commit comments

Comments
 (0)