Changeset 61592 for trunk/dports/java


Ignore:
Timestamp:
Dec 16, 2009, 3:09:14 PM (10 years ago)
Author:
krischik@…
Message:

Improve startup scripts.

Location:
trunk/dports/java/glassfishv3
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/dports/java/glassfishv3/Portfile

    r61460 r61592  
    88version                         3
    99epoch                           62
    10 revision                        1
     10revision                        2
    1111
    1212categories                      java
     
    3939    file copy ${worksrcpath} ${destroot}${prefix}/share/java/${name}
    4040
    41         foreach script {Java_6 Start_Glassfish_Domain1 Stop_Glassfish_Domain1} {
     41        foreach script {Java_6 Java_5 Start_Glassfish_Domain1 Stop_Glassfish_Domain1} {
    4242                xinstall -m 755                                                                                                 \
    4343                        -W ${filespath}                                                                                         \
  • trunk/dports/java/glassfishv3/files/Java_5.command

    r61581 r61592  
    1010
    1111if test "${USER}" = "root"; then
    12     pushd /System/Library/Frameworks/JavaVM.framework/Versions;
     12    pushd "/System/Library/Frameworks/JavaVM.framework/Versions";
    1313        if test -d "A"; then
    1414            rm "Current";
     15            ln -s "A" "Current";   
     16        fi;
     17        if test -d "1.5"; then
    1518            rm "CurrentJDK";
    16             ln -s "A" "Current";   
    17             ln -s "A" "CurrentJDK";
    18         elif test -d "1.6"; then
    19             rm "Current";
    20             rm "CurrentJDK";
    21             ln -s "1.6" "Current";   
    22             ln -s "1.6" "CurrentJDK";
     19            ln -s "1.5" "CurrentJDK";
    2320        fi;
    2421    popd;
  • trunk/dports/java/glassfishv3/files/Java_6.command

    r61399 r61592  
    1010
    1111if test "${USER}" = "root"; then
    12     pushd /System/Library/Frameworks/JavaVM.framework/Versions;
     12    pushd "/System/Library/Frameworks/JavaVM.framework/Versions";
    1313        if test -d "A"; then
    1414            rm "Current";
     15            ln -s "A" "Current";   
     16        fi;
     17        if test -d "1.6"; then
    1518            rm "CurrentJDK";
    16             ln -s "A" "Current";   
    17             ln -s "A" "CurrentJDK";
    18         elif test -d "1.6"; then
    19             rm "Current";
    20             rm "CurrentJDK";
    21             ln -s "1.6" "Current";   
    2219            ln -s "1.6" "CurrentJDK";
    2320        fi;
  • trunk/dports/java/glassfishv3/files/Start_Glassfish_Domain1.command

    r61403 r61592  
    1010
    1111if test "${USER}" = "root"; then
     12    typeset -r in_User="${1}"
     13
    1214    if test -d "@PREFIX@/share/java/glassfishv3/glassfish/domains/domain1"; then
    13         gchown -R martin "@PREFIX@/share/java/glassfishv3/glassfish/domains/domain1"
     15        gchown -R "${in_User}" "@PREFIX@/share/java/glassfishv3/glassfish/domains/domain1"
    1416    fi;
    1517else
     
    1719
    1820    if test -d "@PREFIX@/share/java/glassfishv3"; then
     21        typeset -U path
    1922        typeset -x -g -U -T CLASSPATH classpath ":";
    20         typeset -x -g JAVA_HOME="/Library/Java/Home";
     23        typeset -x -g JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home";
    2124
     25        path=("/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands" ${path})
    2226        path+="@PREFIX@/share/java/glassfishv3/bin";
    2327    fi;
  • trunk/dports/java/glassfishv3/files/Stop_Glassfish_Domain1.command

    r61403 r61592  
    1010
    1111if test "${USER}" = "root"; then
     12    typeset -r in_User="${1}"
     13
    1214    if test -d "@PREFIX@/share/java/glassfishv3/glassfish/domains/domain1"; then
    13         gchown -R martin "@PREFIX@/share/java/glassfishv3/glassfish/domains/domain1"
     15        gchown -R "${in_User}" "@PREFIX@/share/java/glassfishv3/glassfish/domains/domain1"
    1416    fi;
    1517else
     
    1719
    1820    if test -d "@PREFIX@/share/java/glassfishv3"; then
     21        typeset -U path
    1922        typeset -x -g -U -T CLASSPATH classpath ":";
    20         typeset -x -g JAVA_HOME="/Library/Java/Home";
     23        typeset -x -g JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home";
    2124
     25        path=("/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands" ${path})
    2226        path+="@PREFIX@/share/java/glassfishv3/bin";
    2327    fi;
    2428   
    25 :    asadmin stop-domain domain1
     29    asadmin stop-domain domain1
    2630fi;
    2731
Note: See TracChangeset for help on using the changeset viewer.