|
@@ -179,6 +179,7 @@ if [ $? -eq 0 ]; then
|
179
|
179
|
UID=`id -u`;
|
180
|
180
|
fi
|
181
|
181
|
if [ "0" = "${UID}" ]; then
|
|
182
|
+ mkdir -p /usr/lib/jvm/
|
182
|
183
|
installdir=/usr/lib/jvm/${JREJAVAHOME}
|
183
|
184
|
else
|
184
|
185
|
installdir=${HOME}/${JREJAVAHOME}
|
|
@@ -217,20 +218,23 @@ if [ $? -eq 0 ]; then
|
217
|
218
|
mv ${JREJAVAHOME} ${installdir}
|
218
|
219
|
|
219
|
220
|
if [ "0" = "${UID}" ]; then
|
220
|
|
- mkdir -p /usr/lib/jvm/
|
221
|
|
-
|
222
|
221
|
# Add to global path.
|
223
|
222
|
if [ -e "/usr/bin/java" ]; then
|
224
|
223
|
rm -Rf /usr/bin/java
|
225
|
224
|
fi;
|
226
|
225
|
ln -s /usr/lib/jvm/${JREJAVAHOME}/bin/java /usr/bin/java
|
|
226
|
+
|
|
227
|
+ # This allows the main installer to continue with the new java version,
|
|
228
|
+ # incase the shell doesn't find the new binary.
|
|
229
|
+ echo "Adding java-bin: ${installdir}/bin/java -> ${PWD}/java-bin"
|
|
230
|
+ ln -s ${installdir}/bin/java ${PWD}/java-bin
|
227
|
231
|
else
|
228
|
232
|
# Add to path.
|
229
|
233
|
if [ -e ${HOME}/.profile ]; then
|
230
|
234
|
echo "" >> ${HOME}/.profile
|
231
|
235
|
echo "# set PATH so it includes user's private java if it exists" >> ${HOME}/.profile
|
232
|
236
|
echo "if [ -d ~/${JREJAVAHOME}/bin ] ; then" >> ${HOME}/.profile
|
233
|
|
- echo " PATH=~/${JREJAVAHOME}/bin:\"\${PATH}\"" >> ${HOME}/.profile
|
|
237
|
+ echo " PATH=~/${JREJAVAHOME}/bin:\${PATH}" >> ${HOME}/.profile
|
234
|
238
|
echo "fi" >> ${HOME}/.profile
|
235
|
239
|
fi
|
236
|
240
|
if [ -e ${HOME}/.cshrc ]; then
|
|
@@ -241,9 +245,9 @@ if [ $? -eq 0 ]; then
|
241
|
245
|
echo "endfi" >> ${HOME}/.cshrc
|
242
|
246
|
fi
|
243
|
247
|
|
244
|
|
- echo "Adding JREPath: ${PWD}/jrepath"
|
245
|
248
|
# This allows the main installer to continue with the new java version.
|
246
|
|
- echo "export PATH=~/${JREJAVAHOME}/bin:\"\${PATH}\"" > ${PWD}/jrepath
|
|
249
|
+ echo "Adding java-bin: ${installdir}/bin/java -> ${PWD}/java-bin"
|
|
250
|
+ ln -s ${installdir}/bin/java ${PWD}/java-bin
|
247
|
251
|
|
248
|
252
|
# This allows dmdirc launcher to find the jre if the path is not set.
|
249
|
253
|
ln -sf ${installdir} ${HOME}/jre
|
|
@@ -253,9 +257,8 @@ if [ $? -eq 0 ]; then
|
253
|
257
|
exit 0;
|
254
|
258
|
else
|
255
|
259
|
messagedialog "Java Install" "An existing install was found at ${installdir}, but this directory is not in the current path, DMDirc setup will try to use this version of java for the install."
|
256
|
|
- echo "Adding JREPath: ${PWD}/jrepath"
|
257
|
|
- # This allows the main installer to continue with the new java version.
|
258
|
|
- echo "export PATH=~/${JREJAVAHOME}/bin:\"\${PATH}\"" > ${PWD}/jrepath
|
|
260
|
+ echo "Adding java-bin: ${installdir}/bin/java -> ${PWD}/java-bin"
|
|
261
|
+ ln -s ${installdir}/bin/java ${PWD}/java-bin
|
259
|
262
|
exit 0;
|
260
|
263
|
fi;
|
261
|
264
|
else
|