[Swift-commit] r5636 - trunk/bin

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Thu Feb 16 13:50:34 CST 2012


Author: davidk
Date: 2012-02-16 13:50:34 -0600 (Thu, 16 Feb 2012)
New Revision: 5636

Modified:
   trunk/bin/gensites
Log:
Fix for non-gnu readlink (mac)


Modified: trunk/bin/gensites
===================================================================
--- trunk/bin/gensites	2012-02-16 18:41:34 UTC (rev 5635)
+++ trunk/bin/gensites	2012-02-16 19:50:34 UTC (rev 5636)
@@ -200,7 +200,8 @@
                   NAME=`echo $line |cut -d'=' -f1|awk '{print $2}'`
                   COMMAND=`echo $line |cut -d'=' -f2`
                   COMMAND=`eval echo $COMMAND`
-                  echo $HOST $NAME `readlink -f $COMMAND` null null null >> tc.data
+                  COMMAND_PATH=$(cd $(dirname $COMMAND); pwd)/$(basename $COMMAND)
+                  echo $HOST $NAME $COMMAND_PATH null null null >> tc.data
               done
            fi
 
@@ -211,7 +212,8 @@
                     NAME=`echo $line|awk '{print $3}'|cut -d'=' -f1`
                     COMMAND=`echo $line|awk '{print $3}'|cut -d'=' -f2`
                     COMMAND=`eval echo $COMMAND`
-                    eval echo $HOST $NAME `readlink -f $COMMAND` null null null >> tc.data
+                    COMMAND_PATH=$(cd $(dirname $COMMAND); pwd)/$(basename $COMMAND)
+                    eval echo $HOST $NAME $COMMAND_PATH  null null null >> tc.data
                  fi
                done
             fi




More information about the Swift-commit mailing list