X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fmolecules.sh;h=daedcec50086c06c2c525a57834c9a79517a0611;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=dbae220e7c5c35ea71b981cc54acfcf719cec25f;hpb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;p=xscreensaver diff --git a/hacks/glx/molecules.sh b/hacks/glx/molecules.sh index dbae220e..daedcec5 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 ERR 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