File: java.sh.in

package info (click to toggle)
antlr 2.7.7%2Bdfsg-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,020 kB
  • sloc: java: 54,649; cs: 12,537; makefile: 8,852; cpp: 7,359; pascal: 5,273; sh: 4,333; python: 4,299; lisp: 1,969; xml: 220; lex: 192; ansic: 127
file content (93 lines) | stat: -rw-r--r-- 1,650 bytes parent folder | download | duplicates (11)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/sh
test -z "${verbose}" && { 
  verbose=@VERBOSE@
}

abs_top_build_dir=@abs_top_builddir@
java_cmd="@JAVA@"
antlr_jar="@ANTLR_JAR@"
ARGV="$*"

case @build_os@ in
  cygwin)
    test -n "${antlr_jar}" && {
      antlr_jar="`cygpath -m ${antlr_jar}`"
    }
    sep=";"
    ;;
  macos*)
    sep=";"
    ;;
  *)
    sep=":"
    ;;
esac

if test -d "${abs_top_build_dir}"; then
  if test -f "${antlr_jar}" ; then
    
    if test -z "${CLASSPATH}"; then
      ## needs fine tuning - depends on os (wh:tbd)
      CLASSPATH=".${sep}${antlr_jar}"
      export CLASSPATH
    else
      ## needs fine tuning - depends on os (wh:tbd)
      CLASSPATH="${sep}${antlr_jar}${sep}${CLASSPATH}" 
    fi        
  fi
fi

## Translate all non option arguments 
case @build_os@ in
  cygwin)
    set x $ARGV ; shift
    ARGV=
    while test $# -gt 0 ; do
      case $1 in
        -*) 
          ARGV="$ARGV $1"
          ;;
        *)
          ARGV="$ARGV `@CYGPATH_M@ $1`"
          ;;
      esac
      shift
    done
    ;;
  *)
    ;;
esac



## go ahead ..
cmd="${java_cmd} ${ARGV}"
case "${verbose}" in
  0)
    echo $cmd 
    ;;
  *)
    echo $cmd
    ;;
esac

$cmd || {
  rc=$?
  cat <<EOF

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                      >> E R R O R <<
============================================================
CLASSPATH=$CLASSPATH

$cmd

============================================================
Got an error while trying to execute  command  above.  Error
messages (if any) must have shown before. The exit code was:
exit($rc)
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
EOF
  exit $rc
}
exit 0