[seam-commits] Seam SVN: r9319 - trunk.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Oct 14 17:57:05 EDT 2008


Author: dan.j.allen
Date: 2008-10-14 17:57:05 -0400 (Tue, 14 Oct 2008)
New Revision: 9319

Modified:
   trunk/seam
Log:
fix script so that it works on mac OSX (w/o gnu tools installed)


Modified: trunk/seam
===================================================================
--- trunk/seam	2008-10-14 20:34:34 UTC (rev 9318)
+++ trunk/seam	2008-10-14 21:57:05 UTC (rev 9319)
@@ -18,15 +18,24 @@
 WORKING_DIR=$PWD
 
 if [ -z "$SEAM_HOME" ]; then
-    # get the full path (without any relative bits)
-    SEAM_SCRIPT=`readlink -f $0`
+    SEAM_SCRIPT=$0
+    SEAM_SCRIPT_TARGET=`readlink $0`
+    if [ $? -eq 0 ]; then
+        SEAM_SCRIPT=$SEAM_SCRIPT_TARGET
+    fi
+    # get the full path without any relative bits (not really necessary)
+    SEAM_SCRIPT_ABS_PATH=`readlink -f $0 2>/dev/null`
+    if [ $? -eq 0 ]; then
+        SEAM_SCRIPT=$SEAM_SCRIPT_ABS_PATH
+    fi
     SEAM_HOME=`dirname $SEAM_SCRIPT`
 fi
 
 SEAM_GEN_DIR="$SEAM_HOME/seam-gen"
 SEAM_COMMAND="${1}"
 
-echo $SEAM_HOME
+echo "Location of seam script: $SEAM_HOME"
+echo "seam-gen template folder: $SEAM_GEN_DIR"
 
 # OS specific support (must be 'true' or 'false').
 cygwin=false;




More information about the seam-commits mailing list