root / proj / font / xpm_to_xpm2.sh @ 192
History | View | Annotate | Download (447 Bytes)
1 | 188 | up20180642 | cd $1 |
---|---|---|---|
2 | echo "#include \"xpm_utils.h\"" > convert.c |
||
3 | for f in xpm/*.xpm; do |
||
4 | echo "#include \"$f\"" >> convert.c |
||
5 | done |
||
6 | echo "int main(){" >> convert.c |
||
7 | for f in xpm/*.xpm; do |
||
8 | s=${f:4:-4} |
||
9 | echo " xpm_save_as_xpm2($s,\"xpm2/$s.xpm2\");" >> convert.c |
||
10 | done |
||
11 | echo " return 0;" >> convert.c |
||
12 | echo "}" >> convert.c |
||
13 | gcc -I../../include ../../src/xpm_utils.c convert.c -o convert.app |
||
14 | rm -rf xpm2 |
||
15 | mkdir xpm2 |
||
16 | ./convert.app |
||
17 | rm convert.c convert.app |