[Bps-public-commit] Shipwright branch, master, updated. b4f364d76552a1cea26a8af72e98677b9bb65779

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Jul 21 03:46:54 EDT 2009


The branch, master has been updated
       via  b4f364d76552a1cea26a8af72e98677b9bb65779 (commit)
      from  1200a777dbde64cc86b62ccd685b8ec5f445d26c (commit)

Summary of changes:
 share/etc/shipwright-perl-wrapper   |    9 ++++-----
 share/etc/shipwright-script-wrapper |   10 ++++------
 2 files changed, 8 insertions(+), 11 deletions(-)

- Log -----------------------------------------------------------------
commit b4f364d76552a1cea26a8af72e98677b9bb65779
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Jul 21 15:36:15 2009 +0800

    tweak the way we find __as

diff --git a/share/etc/shipwright-perl-wrapper b/share/etc/shipwright-perl-wrapper
index 856c716..ce67f18 100755
--- a/share/etc/shipwright-perl-wrapper
+++ b/share/etc/shipwright-perl-wrapper
@@ -6,17 +6,16 @@ else
     LINK=`readlink $0`
 fi
 
-AS=`cat $0/../../__as`;
-if [ "$AS" = '' ]; then
-    AS=`cat $0/../../../__as`;
-fi
-
 if [ "$LINK" = '' ] || [ $LINK = '../etc/shipwright-perl-wrapper' ] || [ $LINK = '../../etc/shipwright-perl-wrapper' ]; then
     BASE=$0
     BASE_DIR=`dirname "$BASE"`
     BASE_DIR=` (cd "$BASE_DIR"; pwd) `
     FILENAME=`basename "$BASE"`
     WRAPPED_DIR=`basename "$BASE_DIR"`
+    AS=`cat $BASE_DIR/../__as 2>/dev/null`;
+    if [ "$AS" = '' ]; then
+        AS=`cat $BASE_DIR/../../__as 2>/dev/null`;
+    fi
 
     if [ "$LINK" = '../../etc/shipwright-script-wrapper' ]; then
         PARENT_BASE_DIR=` (cd "$BASE_DIR/.."; pwd) `
diff --git a/share/etc/shipwright-script-wrapper b/share/etc/shipwright-script-wrapper
index a0fa5a9..9c66a5a 100755
--- a/share/etc/shipwright-script-wrapper
+++ b/share/etc/shipwright-script-wrapper
@@ -5,18 +5,16 @@ if [ -z `which readlink` ]; then
 else
     LINK=`readlink $0`
 fi
-
-AS=`cat $0/../../__as`;
-if [ "$AS" = '' ]; then
-    AS=`cat $0/../../../__as`;
-fi
-
 if [ "$LINK" = '' ] || [ $LINK = '../etc/shipwright-script-wrapper' ] || [ $LINK = '../../etc/shipwright-script-wrapper' ]; then
     BASE=$0
     BASE_DIR=`dirname "$BASE"`
     BASE_DIR=` (cd "$BASE_DIR"; pwd) `
     FILENAME=`basename "$BASE"`
     WRAPPED_DIR=`basename "$BASE_DIR"`
+    AS=`cat $BASE_DIR/../__as 2>/dev/null`;
+    if [ "$AS" = '' ]; then
+        AS=`cat $BASE_DIR/../../__as 2>/dev/null`;
+    fi
     if [ "$LINK" = '../../etc/shipwright-script-wrapper' ]; then
         PARENT_BASE_DIR=` (cd "$BASE_DIR/.."; pwd) `
         PARENT_WRAPPED_DIR=`basename "$PARENT_BASE_DIR"`

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list