summaryrefslogtreecommitdiff
path: root/lang/scala/patches/patch-bin_sbaz-setup
blob: 8d947a6c5164e3cdfb429256e764011b46ece954 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$NetBSD: patch-bin_sbaz-setup,v 1.1 2011/09/30 07:56:14 yyamano Exp $

Hardwire paths to installed files and Java binary.

--- bin/sbaz-setup.orig	2011-08-29 16:44:20.000000000 +0000
+++ bin/sbaz-setup
@@ -10,25 +10,8 @@ case "`uname`" in
 esac
 
 
-SOURCE=$0;
-SCRIPT=`basename "$SOURCE"`;
-while [ -h "$SOURCE" ]; do
-    SCRIPT=`basename "$SOURCE"`;
-    LOOKUP=`ls -ld "$SOURCE"`;
-    TARGET=`expr "$LOOKUP" : '.*-> \(.*\)$'`;
-    if expr "${TARGET:-.}/" : '/.*/$' > /dev/null; then
-        SOURCE=${TARGET:-.};
-    else
-        SOURCE=`dirname "$SOURCE"`/${TARGET:-.};
-    fi;
-done;
-if [ "$SCALA_HOME" = "" ]
-then
-    SCALA_HOME=`dirname "$SOURCE"`/..;
-    SCALA_HOME=`cd "$SCALA_HOME"; pwd`;
-fi
-
-SBAZ="$SCALA_HOME/bin/sbaz"
+SCALA_HOME=@SCALA_HOME@
+SBAZ="@PREFIX@/bin/sbaz"
 
 if [ "$1" = "" ]
 then