http://www.tienza.es/crux/src/www.jwz.org/xscreensaver/xscreensaver-5.05.tar.gz
[xscreensaver] / hacks / m6502.sh
1 #!/bin/sh
2
3 TARGET=$1
4 shift
5 SRCS=$*
6
7 TMP1=m6502.h.1.$$
8 TMP2=m6502.h.2.$$
9 rm -f $TMP1 $TMP2
10
11 if [ -z "$UTILS_SRC" ]; then UTILS_SRC="../utils"; fi
12
13 for f in $SRCS ; do
14   sed 's/[      ]*;.*$//' < "$f" > $TMP1  # lose comments
15   sh "$UTILS_SRC/ad2c" $TMP1 |
16     sed 's/",$/\\n"/' >> $TMP2
17   echo ',' >> $TMP2
18 done
19 rm $TMP1
20 mv $TMP2 $TARGET