Annotation of /branches/R11-stable/include/java.sminc
Parent Directory | Revision Log
Revision 9880 -
(hide annotations)
(download)
Sat Jan 14 01:48:34 2012 UTC (12 years, 10 months ago) by niro
Original Path: trunk/include/java.sminc
File size: 1125 byte(s)
Sat Jan 14 01:48:34 2012 UTC (12 years, 10 months ago) by niro
Original Path: trunk/include/java.sminc
File size: 1125 byte(s)
-imported from magellan-next
1 | niro | 9644 | # $Id$ |
2 | |||
3 | sminclude mtools | ||
4 | |||
5 | niro | 9667 | JAVA_CLASSPATH_DIR="/usr/share/java" |
6 | |||
7 | niro | 9644 | 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 | niro | 9645 | 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 | niro | 9667 | minstalljar-classpath() |
30 | niro | 9644 | { |
31 | local files | ||
32 | local jar | ||
33 | niro | 9682 | local jarbase |
34 | niro | 9644 | |
35 | files="$@" | ||
36 | |||
37 | # needed directories | ||
38 | minstalldir /etc/env.d || die | ||
39 | minstalldir /usr/share/${PNAME}-${PVER}/lib || die | ||
40 | |||
41 | # classpath env | ||
42 | MCONFIG="/etc/env.d/22java-app-${PNAME}" | ||
43 | |||
44 | for jar in ${files} | ||
45 | do | ||
46 | niro | 9682 | jarbase="$(basename ${jar})" |
47 | minstallfile ${jar} /usr/share/${PNAME}-${PVER}/lib/${jarbase} || die | ||
48 | maddconfig "CLASSPATH=/usr/share/${PNAME}-${PVER}/lib/${jarbase}" || die | ||
49 | niro | 9644 | done |
50 | } | ||
51 | niro | 9667 | |
52 | minstalljar() | ||
53 | { | ||
54 | local files | ||
55 | local jar | ||
56 | niro | 9675 | local jarbase |
57 | niro | 9667 | |
58 | files="$@" | ||
59 | |||
60 | niro | 9669 | minstalldir ${JAVA_CLASSPATH_DIR} || die |
61 | niro | 9667 | for jar in ${files} |
62 | do | ||
63 | niro | 9675 | jarbase="$(basename ${jar} .jar)" |
64 | minstallfile ${jar} ${JAVA_CLASSPATH_DIR}/${jarbase}-${PVER}.jar || die | ||
65 | mlink ${jarbase}-${PVER}.jar ${JAVA_CLASSPATH_DIR}/${jarbase}.jar || die | ||
66 | niro | 9667 | done |
67 | } |