On 18 May 2005, at 2:14 PM, Chris Zubrzycki wrote: [discussion about how to fail a patch script with missing patch file]
> put #!/bin/sh -e as the first line of the patchscript. The -e will > cause it to bail if any commands exit non-zero. > That won't work. It will only bail if the last command in the chain fails. $ cat <<EOF >/tmp/patchscript.sh > #/bin/sh -e > sed s'|@PREFIX@|%p|g' </tmp/foo | patch -p1 > echo "Here I am" > EOF $ chmod +x patchscript.sh $ ./patchscript.sh /patchscript.sh: line 2: /tmp/foo: No such file or directory Here I am $ echo $? 0 -- Rohan Lloyd ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click _______________________________________________ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel