You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Jörg Schaible <Jo...@Elsag-Solutions.com> on 2003/11/04 16:07:55 UTC
[patch] merlin.sh for Cygwin
Hi Steve,
just a heads-up: CVS-version of merlin was built by my maven-rc1 without any problems using Suns's jdk1.4.2.
Regards,
Jörg
Additionally here's a small patch for the merlin.sh to run on Cygwin (basically just transferring some lines from merlin-server.sh):
$ diff -u ../../../platform/src/bin/merlin.sh merlin.sh
--- ../../../platform/src/bin/merlin.sh 2003-09-24 11:33:23.000000000 +0200
+++ merlin.sh 2003-11-04 16:06:54.076625600 +0100
@@ -1,5 +1,11 @@
#! /bin/sh
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+esac
+
# Checking for JAVA_HOME is required on *nix due
# to some distributions stupidly including kaffe in /usr/bin
if [ "$JAVA_HOME" = "" ] ; then
@@ -20,6 +26,13 @@
exit 1
fi
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin; then
+ [ -n "$MERLIN_HOME" ] && MERLIN_HOME=`cygpath --unix "$MERLIN_HOME"`
+ # switch paths to Windows format before running java
+ MERLIN_HOME=`cygpath --path --windows "$MERLIN_HOME"`
+fi
+
RUN_CMD="$JAVA_HOME/bin/java -Djava.security.policy=$MERLIN_HOME/bin/security.policy -Dmerlin.home=$MERLIN_HOME -Djava.ext.dirs=$MERLIN_HOME/ext -jar $MERLIN_HOME/bin/lib/merlin-bootstrap-1.0.jar $*"
echo "RUN CMD IS: $RUN_CMD"
exec $RUN_CMD
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org