X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fm6502.sh;h=50cebfcc03e1bb434911721a501861c8e2d8a20d;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=ee7f8e220869178a00cc2e0882904701eb2d0308;hpb=6b1c86cf395f59389e4ece4ea8f4bea2c332745b;p=xscreensaver diff --git a/hacks/m6502.sh b/hacks/m6502.sh index ee7f8e22..50cebfcc 100755 --- a/hacks/m6502.sh +++ b/hacks/m6502.sh @@ -7,6 +7,7 @@ SRCS=$* TMP1=m6502.h.1.$$ TMP2=m6502.h.2.$$ rm -f $TMP1 $TMP2 +trap "rm -f $TMP1 $TMP2" 1 2 3 15 ERR EXIT if [ -z "$UTILS_SRC" ]; then UTILS_SRC="../utils"; fi @@ -16,5 +17,10 @@ for f in $SRCS ; do sed 's/",$/\\n"/' >> $TMP2 echo ',' >> $TMP2 done -rm $TMP1 -mv $TMP2 $TARGET +rm -f $TMP1 +if cmp -s $TMP2 $TARGET ; then + rm -f $TMP2 +else + mv $TMP2 $TARGET +fi +