Initial release of Maemo 5 port of gnuplot
[gnuplot] / term / PostScript / ps_header.sh
1 #! /bin/sh
2
3 echo "/* This script-generated file contains the PostScript prologues" > output
4 echo " * in a form suitable to inclusion in a C source code */" >> output
5 echo "" >> output
6
7 for i in `ls -1 *.ps | LC_ALL=C sort`; do
8         echo $i > temp
9         name=`sed -e 's/\.ps/_ps/g' -e 's/-/_/g' temp`
10         rm temp
11         echo "static const char *prologue_$name[] = {" >> output
12         sed -e 's/"/\\"/g' -e 's/^/\"/g' -e 's/\t/\\t/g' -e 's/$/\\n\",/g' $i >> output
13         echo "NULL" >> output
14         echo "};" >> output
15         echo "" >> output
16 done
17
18 cat output
19
20 rm output
21