projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.36.tar.gz
[xscreensaver]
/
hacks
/
glx
/
molecules.sh
diff --git
a/hacks/glx/molecules.sh
b/hacks/glx/molecules.sh
index dbae220e7c5c35ea71b981cc54acfcf719cec25f..4f417c3991132b0dac4cde24743ac796314e4f4c 100755
(executable)
--- a/
hacks/glx/molecules.sh
+++ b/
hacks/glx/molecules.sh
@@
-6,6
+6,7
@@
SRCS=$*
TMP=molecules.h.$$
rm -f $TMP
TMP=molecules.h.$$
rm -f $TMP
+trap "rm -f $TMP" 1 2 3 15 EXIT
if [ -z "$UTILS_SRC" ]; then UTILS_SRC="../../utils"; fi
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
sed 's/",$/\\n"/' >> $TMP
echo ',' >> $TMP
done
-mv $TMP $TARGET
+
+if cmp -s $TMP $TARGET ; then
+ rm $TMP
+else
+ mv $TMP $TARGET
+fi