~ubuntu-branches/ubuntu/gutsy/jflex/gutsy

« back to all changes in this revision

Viewing changes to bin/jflex

  • Committer: Bazaar Package Importer
  • Author(s): Takashi Okamoto
  • Date: 2002-02-16 13:38:21 UTC
  • Revision ID: james.westby@ubuntu.com-20020216133821-5wsdprpt9xl7ondr
Tags: upstream-1.3.5
ImportĀ upstreamĀ versionĀ 1.3.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/bash 
 
2
#
 
3
#     JFlex start script $Revision: 1.16 $
 
4
#
 
5
# if Java is not in your binary path, you need to supply its
 
6
# location in this script. The script automatically finds 
 
7
# JFLEX_HOME when called directly, via binary path, or symbolic
 
8
# link. 
 
9
#
 
10
# Site wide installation: simply make a symlink from e.g.
 
11
# /usr/bin/jflex to this script at its original position
 
12
#
 
13
#===================================================================
 
14
#
 
15
# configurables:
 
16
 
 
17
# path to the java interpreter
 
18
JAVA=java
 
19
 
 
20
# end configurables
 
21
#
 
22
#===================================================================
 
23
#
 
24
 
 
25
# calculate true location
 
26
 
 
27
PRG=`type $0`
 
28
PRG=${PRG##* }
 
29
 
 
30
# If PRG is a symlink, trace it to the real home directory
 
31
 
 
32
while [ -L "$PRG" ]
 
33
do
 
34
    newprg=$(ls -l ${PRG})
 
35
    newprg=${newprg##*-> }
 
36
    [ ${newprg} = ${newprg#/} ] && newprg=${PRG%/*}/${newprg}
 
37
    PRG="$newprg"
 
38
done
 
39
 
 
40
PRG=${PRG%/*}
 
41
JFLEX_HOME=${PRG}/.. 
 
42
 
 
43
# --------------------------------------------------------------------
 
44
 
 
45
export CLASSPATH
 
46
CLASSPATH=$JFLEX_HOME/lib/JFlex.jar
 
47
 
 
48
$JAVA JFlex.Main $@
 
49
 
 
50
#for more memory:
 
51
#$JAVA -Xmx128m JFlex.Main $@