Contents of /branches/R11-stable/include/java.sminc
Parent Directory | Revision Log
Revision 9675 -
(show annotations)
(download)
Wed Jan 4 14:08:43 2012 UTC (12 years, 10 months ago) by niro
Original Path: branches/magellan-next/include/java.sminc
File size: 1064 byte(s)
Wed Jan 4 14:08:43 2012 UTC (12 years, 10 months ago) by niro
Original Path: branches/magellan-next/include/java.sminc
File size: 1064 byte(s)
-fixed variable name issues
1 | # $Id$ |
2 | |
3 | sminclude mtools |
4 | |
5 | JAVA_CLASSPATH_DIR="/usr/share/java" |
6 | |
7 | jar-path-from-classpath() |
8 | { |
9 | local jar="$1" |
10 | local i |
11 | |
12 | for i in ${CLASSPATH//:/ } |
13 | do |
14 | case ${i} in |
15 | *${jar}) echo ${i};; |
16 | esac |
17 | done |
18 | } |
19 | |
20 | mclasspathinit() |
21 | { |
22 | minstalldir /etc/env.d || die |
23 | |
24 | # classpath env |
25 | MCONFIG="/etc/env.d/22java-app-${PNAME}" |
26 | mclearconfig || die |
27 | } |
28 | |
29 | minstalljar-classpath() |
30 | { |
31 | local files |
32 | local jar |
33 | |
34 | files="$@" |
35 | |
36 | # needed directories |
37 | minstalldir /etc/env.d || die |
38 | minstalldir /usr/share/${PNAME}-${PVER}/lib || die |
39 | |
40 | # classpath env |
41 | MCONFIG="/etc/env.d/22java-app-${PNAME}" |
42 | |
43 | for jar in ${files} |
44 | do |
45 | minstallfile ${jar} /usr/share/${PNAME}-${PVER}/lib || die |
46 | maddconfig "CLASSPATH=/usr/share/${PNAME}-${PVER}/lib/${jar}" || die |
47 | done |
48 | } |
49 | |
50 | minstalljar() |
51 | { |
52 | local files |
53 | local jar |
54 | local jarbase |
55 | |
56 | files="$@" |
57 | |
58 | minstalldir ${JAVA_CLASSPATH_DIR} || die |
59 | for jar in ${files} |
60 | do |
61 | jarbase="$(basename ${jar} .jar)" |
62 | minstallfile ${jar} ${JAVA_CLASSPATH_DIR}/${jarbase}-${PVER}.jar || die |
63 | mlink ${jarbase}-${PVER}.jar ${JAVA_CLASSPATH_DIR}/${jarbase}.jar || die |
64 | done |
65 | } |