Magellan Linux

Contents of /branches/R11-unstable/include/java.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9669 - (show annotations) (download)
Wed Jan 4 13:12:17 2012 UTC (12 years, 10 months ago) by niro
Original Path: branches/magellan-next/include/java.sminc
File size: 915 byte(s)
-fixed minstalljar()
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
55 files="$@"
56
57 minstalldir ${JAVA_CLASSPATH_DIR} || die
58 for jar in ${files}
59 do
60 minstallfile ${jar} ${JAVA_CLASSPATH_DIR} || die
61 done
62 }