[61592] trunk/dports/java/glassfishv3
krischik at macports.org
krischik at macports.org
Wed Dec 16 07:09:14 PST 2009
Revision: 61592
http://trac.macports.org/changeset/61592
Author: krischik at macports.org
Date: 2009-12-16 07:09:14 -0800 (Wed, 16 Dec 2009)
Log Message:
-----------
Improve startup scripts.
Modified Paths:
--------------
trunk/dports/java/glassfishv3/Portfile
trunk/dports/java/glassfishv3/files/Java_6.command
trunk/dports/java/glassfishv3/files/Start_Glassfish_Domain1.command
trunk/dports/java/glassfishv3/files/Stop_Glassfish_Domain1.command
Added Paths:
-----------
trunk/dports/java/glassfishv3/files/Java_5.command
Modified: trunk/dports/java/glassfishv3/Portfile
===================================================================
--- trunk/dports/java/glassfishv3/Portfile 2009-12-16 14:54:16 UTC (rev 61591)
+++ trunk/dports/java/glassfishv3/Portfile 2009-12-16 15:09:14 UTC (rev 61592)
@@ -7,7 +7,7 @@
name glassfishv3
version 3
epoch 62
-revision 1
+revision 2
categories java
maintainers krischik
@@ -38,7 +38,7 @@
file copy ${worksrcpath} ${destroot}${prefix}/share/java/${name}
- foreach script {Java_6 Start_Glassfish_Domain1 Stop_Glassfish_Domain1} {
+ foreach script {Java_6 Java_5 Start_Glassfish_Domain1 Stop_Glassfish_Domain1} {
xinstall -m 755 \
-W ${filespath} \
${script}.command \
Copied: trunk/dports/java/glassfishv3/files/Java_5.command (from rev 61581, trunk/dports/java/glassfishv3/files/Java_6.command)
===================================================================
--- trunk/dports/java/glassfishv3/files/Java_5.command (rev 0)
+++ trunk/dports/java/glassfishv3/files/Java_5.command 2009-12-16 15:09:14 UTC (rev 61592)
@@ -0,0 +1,28 @@
+#!/bin/zsh
+############################################################## {{{1 ##########
+# $Author$
+# $Revision$
+# $Date$
+# $HeadURL$
+############################################################## }}}1 ##########
+
+setopt X_Trace;
+
+if test "${USER}" = "root"; then
+ pushd "/System/Library/Frameworks/JavaVM.framework/Versions";
+ if test -d "A"; then
+ rm "Current";
+ ln -s "A" "Current";
+ fi;
+ if test -d "1.5"; then
+ rm "CurrentJDK";
+ ln -s "1.5" "CurrentJDK";
+ fi;
+ popd;
+else
+ sudo ${0}
+fi;
+
+############################################################ {{{1 ###########
+# vim: set nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab :
+# vim: set textwidth=0 filetype=zsh foldmethod=marker nospell :
Modified: trunk/dports/java/glassfishv3/files/Java_6.command
===================================================================
--- trunk/dports/java/glassfishv3/files/Java_6.command 2009-12-16 14:54:16 UTC (rev 61591)
+++ trunk/dports/java/glassfishv3/files/Java_6.command 2009-12-16 15:09:14 UTC (rev 61592)
@@ -9,16 +9,13 @@
setopt X_Trace;
if test "${USER}" = "root"; then
- pushd /System/Library/Frameworks/JavaVM.framework/Versions;
+ pushd "/System/Library/Frameworks/JavaVM.framework/Versions";
if test -d "A"; then
rm "Current";
- rm "CurrentJDK";
ln -s "A" "Current";
- ln -s "A" "CurrentJDK";
- elif test -d "1.6"; then
- rm "Current";
+ fi;
+ if test -d "1.6"; then
rm "CurrentJDK";
- ln -s "1.6" "Current";
ln -s "1.6" "CurrentJDK";
fi;
popd;
Modified: trunk/dports/java/glassfishv3/files/Start_Glassfish_Domain1.command
===================================================================
--- trunk/dports/java/glassfishv3/files/Start_Glassfish_Domain1.command 2009-12-16 14:54:16 UTC (rev 61591)
+++ trunk/dports/java/glassfishv3/files/Start_Glassfish_Domain1.command 2009-12-16 15:09:14 UTC (rev 61592)
@@ -9,16 +9,20 @@
setopt X_Trace;
if test "${USER}" = "root"; then
+ typeset -r in_User="${1}"
+
if test -d "@PREFIX@/share/java/glassfishv3/glassfish/domains/domain1"; then
- gchown -R martin "@PREFIX@/share/java/glassfishv3/glassfish/domains/domain1"
+ gchown -R "${in_User}" "@PREFIX@/share/java/glassfishv3/glassfish/domains/domain1"
fi;
else
sudo ${0} ${USER}
if test -d "@PREFIX@/share/java/glassfishv3"; then
+ typeset -U path
typeset -x -g -U -T CLASSPATH classpath ":";
- typeset -x -g JAVA_HOME="/Library/Java/Home";
+ typeset -x -g JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home";
+ path=("/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands" ${path})
path+="@PREFIX@/share/java/glassfishv3/bin";
fi;
Modified: trunk/dports/java/glassfishv3/files/Stop_Glassfish_Domain1.command
===================================================================
--- trunk/dports/java/glassfishv3/files/Stop_Glassfish_Domain1.command 2009-12-16 14:54:16 UTC (rev 61591)
+++ trunk/dports/java/glassfishv3/files/Stop_Glassfish_Domain1.command 2009-12-16 15:09:14 UTC (rev 61592)
@@ -9,20 +9,24 @@
setopt X_Trace;
if test "${USER}" = "root"; then
+ typeset -r in_User="${1}"
+
if test -d "@PREFIX@/share/java/glassfishv3/glassfish/domains/domain1"; then
- gchown -R martin "@PREFIX@/share/java/glassfishv3/glassfish/domains/domain1"
+ gchown -R "${in_User}" "@PREFIX@/share/java/glassfishv3/glassfish/domains/domain1"
fi;
else
sudo ${0} ${USER}
if test -d "@PREFIX@/share/java/glassfishv3"; then
+ typeset -U path
typeset -x -g -U -T CLASSPATH classpath ":";
- typeset -x -g JAVA_HOME="/Library/Java/Home";
+ typeset -x -g JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home";
+ path=("/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands" ${path})
path+="@PREFIX@/share/java/glassfishv3/bin";
fi;
-: asadmin stop-domain domain1
+ asadmin stop-domain domain1
fi;
############################################################ {{{1 ###########
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091216/142e83e0/attachment.html>
More information about the macports-changes
mailing list