Changeset 2780


Ignore:
Timestamp:
05/23/12 15:58:02 (2 years ago)
Author:
jdsiiro
Message:

Fix so that print.sh works when called outside setup.sh (i.e. with
pipefail off).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • hudson/common/print.sh

    r2416 r2780  
    11#!/usr/bin/env bash 
     2 
     3PIPEFAIL_OFF=`set -o | grep pipefail | grep off | wc -l` 
     4if test $PIPEFAIL_OFF -gt 0; then 
     5    set -o pipefail 
     6fi 
    27 
    38echo 
     
    2732# Libtool is a required special case: the "version" option is different 
    2833# on Mac, so we will do two checks 
    29 app=libtool 
    30 echo "  $app:" 
    31 $app --version 2>&1 | grep -v '^$' | sed 's/^/    /' \ 
    32   || $app -V 2>&1 | grep -v '^$' | sed 's/^/    /' \ 
    33   || exit 1 
     34echo "  libtool:" 
     35ver_info=`libtool --version 2>&1` 
     36if test $? -ne 0; then 
     37    ver_info1=`libtool -V 2>&1` 
     38    if test $? -ne 0; then 
     39        echo "$ver_info" | grep -v '^$' | sed 's/^/    /'  
     40        echo 
     41        echo "$ver_info1" | grep -v '^$' | sed 's/^/    /'  
     42        exit 1 
     43    fi 
     44    ver_info="$ver_info1" 
     45fi 
     46echo "$ver_info" | grep -v '^$' | sed 's/^/    /'   
    3447echo 
    3548 
     
    4154    echo 
    4255done 
    43 set -o pipefail 
    4456 
     57if test $PIPEFAIL_OFF -eq 0; then 
     58    set -o pipefail 
     59fi 
Note: See TracChangeset for help on using the changeset viewer.