X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fmolecules.sh;h=4f417c3991132b0dac4cde24743ac796314e4f4c;hb=d6b0217f2417bd19187f0ebc389d6c5c2233b11c;hp=dbae220e7c5c35ea71b981cc54acfcf719cec25f;hpb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;p=xscreensaver diff --git a/hacks/glx/molecules.sh b/hacks/glx/molecules.sh index dbae220e..4f417c39 100755 --- a/hacks/glx/molecules.sh +++ b/hacks/glx/molecules.sh @@ -6,6 +6,7 @@ SRCS=$* TMP=molecules.h.$$ rm -f $TMP +trap "rm -f $TMP" 1 2 3 15 EXIT if [ -z "$UTILS_SRC" ]; then UTILS_SRC="../../utils"; fi @@ -14,4 +15,9 @@ for f in $SRCS ; do sed 's/",$/\\n"/' >> $TMP echo ',' >> $TMP done -mv $TMP $TARGET + +if cmp -s $TMP $TARGET ; then + rm $TMP +else + mv $TMP $TARGET +fi