1 |
iliev |
787 |
#!/bin/sh |
2 |
|
|
# |
3 |
|
|
# JSampler - a java front-end for LinuxSampler |
4 |
|
|
# |
5 |
iliev |
911 |
# Copyright (C) 2005, 2006 Grigor Kirilov Iliev |
6 |
iliev |
787 |
# |
7 |
|
|
# This file is part of JSampler. |
8 |
|
|
# |
9 |
|
|
# JSampler is free software; you can redistribute it and/or modify |
10 |
|
|
# it under the terms of the GNU General Public License version 2 |
11 |
|
|
# as published by the Free Software Foundation. |
12 |
|
|
# |
13 |
|
|
# JSampler is distributed in the hope that it will be useful, |
14 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 |
|
|
# GNU General Public License for more details. |
17 |
|
|
# |
18 |
|
|
# You should have received a copy of the GNU General Public License |
19 |
|
|
# along with JSampler; if not, write to the Free Software |
20 |
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 |
|
|
# MA 02111-1307 USA |
22 |
|
|
|
23 |
|
|
|
24 |
|
|
# Set the JAVA_HOME variable to specify the java distribution to be used. |
25 |
|
|
#JAVA_HOME= |
26 |
|
|
|
27 |
|
|
# If you want to run js-classic.jar from a different directory |
28 |
|
|
# you must define JS_CLASSIC_PATH to point to js-classic.jar location. |
29 |
|
|
#JS_CLASSIC_PATH= |
30 |
|
|
|
31 |
|
|
if [ -n "$JAVA_HOME" ] ; then |
32 |
|
|
if [ -x "$JAVA_HOME/bin/java" ] ; then |
33 |
|
|
JAVA="$JAVA_HOME/bin/java" |
34 |
|
|
fi |
35 |
|
|
fi |
36 |
|
|
|
37 |
|
|
if [ -z "$JAVA" ] ; then |
38 |
|
|
if [ -x "`which java`" ] ; then |
39 |
|
|
JAVA="`which java`" |
40 |
|
|
fi |
41 |
|
|
fi |
42 |
|
|
|
43 |
|
|
if [ -n "$JAVA" ] ; then |
44 |
|
|
if [ -n "$JS_CLASSIC_PATH" ] ; then |
45 |
|
|
$JAVA -jar $JS_CLASSIC_PATH/js-classic.jar |
46 |
|
|
else |
47 |
|
|
$JAVA -jar js-classic.jar |
48 |
|
|
fi |
49 |
|
|
else |
50 |
iliev |
911 |
echo "Unable to find java! Please set JAVA_HOME to point to your JRE/JDK directory." |
51 |
iliev |
787 |
echo "Example:" |
52 |
|
|
echo "export JAVA_HOME=/opt/jdk1.5.0_04" |
53 |
|
|
fi |