Changeset 808db8e in rtems


Ignore:
Timestamp:
Aug 4, 2006, 9:48:38 AM (15 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
1a768ef
Parents:
5aafd7a
Message:

Fix the return code when used with tee.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/mingw/build.sh

    r5aafd7a r808db8e  
     1#! /bin/sh
    12#
    23# $Id$
     
    910#
    1011
     12command_line="$0 $*"
     13
    1114terminate()
    1215{
    1316  echo "error: $*" >&2
    1417  exit 1
     18  echo "after"
    1519}
    1620
     
    1822{
    1923 if [ $? -ne 0 ]; then
    20   terminate
     24  terminate $*
    2125 fi
    2226}
     
    8185done
    8286
     87echo "$command_line" > $log
     88
    8389scripts=$(dirname $0)
    8490
    85 $scripts/build-rpms.sh -i $debug $no_run $prefix $source $targets $hosts $version 2>&1 | tee $log
    86 check "Making the RPM files."
     91$scripts/build-rpms.sh -i $debug $no_run $prefix $source $targets $hosts $version 2>&1 | tee -a $log
     92if [ ${PIPESTATUS[0]} -ne 0 ]; then
     93 terminate "Making the RPM files."
     94fi
    8795
    8896$scripts/build-exes.sh $debug $no_run $prefix $targets $relocation 2>&1 | tee -a $log
    89 check "Making the executable files."
     97if [ ${PIPESTATUS[0]} -ne 0 ]; then
     98 terminate "Making the executable files."
     99fi
    90100
     101exit 0
Note: See TracChangeset for help on using the changeset viewer.