diff options
author | Simon Rettberg | 2018-10-16 10:08:48 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-10-16 10:08:48 +0200 |
commit | d3a98cf6cbc3bd0b9efc570f58e8812c03931c18 (patch) | |
tree | cbddf8e50f35a9c6e878a5bfe3c6d625d99e12ba /hacks/glx/molecules.sh | |
download | xscreensaver-d3a98cf6cbc3bd0b9efc570f58e8812c03931c18.tar.gz xscreensaver-d3a98cf6cbc3bd0b9efc570f58e8812c03931c18.tar.xz xscreensaver-d3a98cf6cbc3bd0b9efc570f58e8812c03931c18.zip |
Original 5.40
Diffstat (limited to 'hacks/glx/molecules.sh')
-rwxr-xr-x | hacks/glx/molecules.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/hacks/glx/molecules.sh b/hacks/glx/molecules.sh new file mode 100755 index 0000000..4f417c3 --- /dev/null +++ b/hacks/glx/molecules.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +TARGET=$1 +shift +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 + +for f in $SRCS ; do + sh "$UTILS_SRC/ad2c" "$f" | + sed 's/",$/\\n"/' >> $TMP + echo ',' >> $TMP +done + +if cmp -s $TMP $TARGET ; then + rm $TMP +else + mv $TMP $TARGET +fi |