2 |
|
|
3 |
sminclude mtools |
sminclude mtools |
4 |
|
|
5 |
jar-path-from-classpath() |
JAVA_CLASSPATH_DIR="/usr/share/java" |
6 |
|
|
7 |
|
mget-jar-path-from-classpath() |
8 |
{ |
{ |
9 |
local jar="$1" |
local jar="$1" |
10 |
local i |
local i |
17 |
done |
done |
18 |
} |
} |
19 |
|
|
20 |
minstalljar() |
# deprecated and will be dropped in near future |
21 |
|
jar-path-from-classpath() |
22 |
|
{ |
23 |
|
echo -e "${COLYELLOW}Warning: jar-path-from-classpath() is depcrecated, please use mget-jar-path-from-classpath() instead${COLDEFAULT}" >&2 |
24 |
|
mget-jar-path-from-classpath $@ |
25 |
|
} |
26 |
|
|
27 |
|
mclasspathinit() |
28 |
|
{ |
29 |
|
minstalldir /etc/env.d || die |
30 |
|
|
31 |
|
# classpath env |
32 |
|
MCONFIG="/etc/env.d/22java-app-${PNAME}" |
33 |
|
mclearconfig || die |
34 |
|
} |
35 |
|
|
36 |
|
minstalljar-classpath() |
37 |
{ |
{ |
38 |
local files |
local files |
39 |
local jar |
local jar |
40 |
|
local jarbase |
41 |
|
|
42 |
files="$@" |
files="$@" |
43 |
|
|
50 |
|
|
51 |
for jar in ${files} |
for jar in ${files} |
52 |
do |
do |
53 |
minstallfile ${jar} /usr/share/${PNAME}-${PVER}/lib || die |
jarbase="$(basename ${jar})" |
54 |
maddconfig "CLASSPATH=/usr/share/${PNAME}-${PVER}/lib/${jar}" || die |
minstallfile ${jar} /usr/share/${PNAME}-${PVER}/lib/${jarbase} || die |
55 |
|
maddconfig "CLASSPATH=/usr/share/${PNAME}-${PVER}/lib/${jarbase}" || die |
56 |
|
done |
57 |
|
} |
58 |
|
|
59 |
|
minstalljar() |
60 |
|
{ |
61 |
|
local files |
62 |
|
local jar |
63 |
|
local jarbase |
64 |
|
|
65 |
|
files="$@" |
66 |
|
|
67 |
|
minstalldir ${JAVA_CLASSPATH_DIR} || die |
68 |
|
for jar in ${files} |
69 |
|
do |
70 |
|
jarbase="$(basename ${jar} .jar)" |
71 |
|
minstallfile ${jar} ${JAVA_CLASSPATH_DIR}/${jarbase}-${PVER}.jar || die |
72 |
|
mlink ${jarbase}-${PVER}.jar ${JAVA_CLASSPATH_DIR}/${jarbase}.jar || die |
73 |
done |
done |
74 |
} |
} |