This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

wwwdocs/bin/preprocess - patch to give zero on success


Hi.

The script "preprocess" always gives nonzero (i.e. 1) exit status.
That's not good when it's used to check success, as by the htdig
update script (no, it's not fatal).

I must confess I managed to reset the dates of all web documents
by accidentally invoking preprocess with no arguments. :-(

Ok to install?

Index: preprocess
===================================================================
RCS file: /cvs/gcc/wwwdocs/bin/preprocess,v
retrieving revision 1.9
diff -p -c -r1.9 preprocess
*** preprocess	2000/02/16 00:05:00	1.9
--- preprocess	2000/02/17 03:50:35
*************** cleanup() {
*** 39,45 ****
      rm -rf $TMPDIR $1
  }
  
! trap "cleanup; exit 1" 0 1 2 15 
  
  ####
  # Process a single file.
--- 39,45 ----
      rm -rf $TMPDIR $1
  }
  
! trap "cleanup; exit 1" 1 2 15 
  
  ####
  # Process a single file.
*************** else 
*** 107,109 ****
--- 107,113 ----
          process_file $f
      done
  fi
+ 
+ # Get a clean exit status on success.
+ cleanup
+ exit 0

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]