# HG changeset patch # User Rob Landley # Date 1402254097 18000 # Node ID a3844a8132bcb2386218072bff343acb5e851292 # Parent e084440e6995a9c3d0040b54179015ec9257136e Isaac Dunham also reported that some diff implementations can't handle nonseekable input, so write to a temporary file instead of <(command). Use trap EXIT to make sure the temporary files get deleted. diff -r e084440e6995 -r a3844a8132bc scripts/bloatcheck --- a/scripts/bloatcheck Sun Jun 08 13:49:57 2014 -0500 +++ b/scripts/bloatcheck Sun Jun 08 14:01:37 2014 -0500 @@ -58,6 +58,10 @@ printf "% 71d total\n" "$TOTAL" } -diff -U 0 <(nm --size-sort "$1" | sort -k3,3) \ - <(nm --size-sort "$2" | sort -k3,3) \ - | tail -n +3 | sed -n 's/^\([-+]\)/\1 /p' | sort -k4,4 | do_bloatcheck +DIFF1=`mktemp base.XXXXXXX` +DIFF2=`mktemp bloat.XXXXXXX` +trap "rm $DIFF1 $DIFF2" EXIT +nm --size-sort "$1" | sort -k3,3 > $DIFF1 +nm --size-sort "$2" | sort -k3,3 > $DIFF2 +diff -U 0 $DIFF1 $DIFF2 | tail -n +3 | sed -n 's/^\([-+]\)/\1 /p' \ + | sort -k4,4 | do_bloatcheck