You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/12/12 12:07:01 UTC
cvs commit: avalon/merlin/platform/src/bin merlin.sh
mcconnell 2003/12/12 03:07:01
Modified: merlin/platform/src/bin merlin.sh
Log:
Patch from J�rg Schaible applied.
Revision Changes Path
1.5 +13 -0 avalon/merlin/platform/src/bin/merlin.sh
Index: merlin.sh
===================================================================
RCS file: /home/cvs/avalon/merlin/platform/src/bin/merlin.sh,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- merlin.sh 8 Dec 2003 18:45:02 -0000 1.4
+++ merlin.sh 12 Dec 2003 11:07:01 -0000 1.5
@@ -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
@@ -18,6 +24,13 @@
echo "Please, set the MERLIN_HOME variable in your environment to match the"
echo "location of Merlin distribution."
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-cli-3.2-dev.jar $*"
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org