[Bps-public-commit] r14214 - in Shipwright: .

spang at bestpractical.com spang at bestpractical.com
Thu Jul 17 09:06:59 EDT 2008


Author: spang
Date: Thu Jul 17 09:06:55 2008
New Revision: 14214

Modified:
   Shipwright/   (props changed)
   Shipwright/trunk/share/etc/shipwright-source-bash
   Shipwright/trunk/share/etc/shipwright-source-tcsh

Log:
 r44263 at loki:  spang | 2008-07-17 14:06:33 +0100
 set TERMINFO in the source scripts if the vessel ships ncurses. also, check if env variables are defined before setting them in the tcsh script because we merely tack more paths onto existing ones, and attempting to access undefined variables is a fatal error in tcsh


Modified: Shipwright/trunk/share/etc/shipwright-source-bash
==============================================================================
--- Shipwright/trunk/share/etc/shipwright-source-bash	(original)
+++ Shipwright/trunk/share/etc/shipwright-source-bash	Thu Jul 17 09:06:55 2008
@@ -1,6 +1,11 @@
 #!/usr/bin/env bash
 if [ $# = 1 ]; then
     export PATH=$1/bin:$PATH
+    # fix vessels which ship their own ncurses, but don't clobber $TERMINFO
+    # if it's already been set
+    if [ ! $TERMINFO ] && [ -d $1/share/terminfo ]; then
+        export TERMINFO=$1/share/terminfo
+    fi
     export PERL5LIB=$1/lib/perl5/site_perl:$1/lib/perl5:${PERL5LIB}
     export LD_LIBRARY_PATH=$1/lib:${LD_LIBRARY_PATH}
     export DYLD_LIBRARY_PATH=$1/lib:${DYLD_LIBRARY_PATH}

Modified: Shipwright/trunk/share/etc/shipwright-source-tcsh
==============================================================================
--- Shipwright/trunk/share/etc/shipwright-source-tcsh	(original)
+++ Shipwright/trunk/share/etc/shipwright-source-tcsh	Thu Jul 17 09:06:55 2008
@@ -1,9 +1,26 @@
 #!/usr/bin/env tcsh
 if ( $# == 1 ) then
     setenv PATH $1/bin:$PATH
-    setenv PERL5LIB $1/lib/perl5/site_perl:$1/lib/perl5:${PERL5LIB}
-    setenv LD_LIBRARY_PATH $1/lib:${LD_LIBRARY_PATH}
-    setenv DYLD_LIBRARY_PATH $1/lib:${DYLD_LIBRARY_PATH}
+    # fix vessels which ship their own ncurses, but don't clobber $TERMINFO
+    # if it's already been set
+    if ( ! $?TERMINFO && -d $1/share/terminfo ) then
+        setenv TERMINFO $1/share/terminfo
+    endif
+    if ( $?PERL5LIB ) then
+        setenv PERL5LIB $1/lib/perl5/site_perl:$1/lib/perl5:${PERL5LIB}
+    else
+        setenv PERL5LIB $1/lib/perl5/site_perl:$1/lib/perl5
+    endif
+    if ( $?LD_LIBRARY_PATH ) then
+        setenv LD_LIBRARY_PATH $1/lib:${LD_LIBRARY_PATH}
+    else
+        setenv LD_LIBRARY_PATH $1/lib
+    endif
+    if ( $?DYLD_LIBRARY_PATH ) then
+        setenv DYLD_LIBRARY_PATH $1/lib:${DYLD_LIBRARY_PATH}
+    else
+        setenv DYLD_LIBRARY_PATH $1/lib
+    endif
 else
     echo 'USAGE: source shipwright-source-tcsh BASEPATH'
 endif



More information about the Bps-public-commit mailing list