make-xpms revision 5307cd1a
11.2Sabs#!/bin/sh 21.1Sabs# $XTermId: make-xpms,v 1.5 2012/10/02 00:22:22 tom Exp $ 31.1Sabs# some files are generated from other icons... 41.1Sabsfor name in mini.xterm filled-xterm xterm xterm-color 51.2Sabsdo 61.1Sabs target=${name}.xpms 71.1Sabs NAME=`echo "$target" | sed -e 's/[\.-]/_/g'` 81.1Sabs LIST= 91.1Sabs echo "** creating $target" 10 rm -f $target 11 echo "/* @XTermId@ */" | sed -e 's/@/$/g' >$target 12 echo "/* generated by $0 $* */" >>$target 13 echo "/* vile:xpmmode */" >>$target 14 for source in ${name}_*[0-9]x[1-9]*.xpm 15 do 16 echo ".. from $source" 17 BASE=`basename "$source" .xpm` 18 PART=`echo "$source" | sed -e 's/[\.-]/_/g'` 19 test -n "$LIST" && LIST="$LIST, " 20 LIST="$LIST 21 { \"$BASE\", $PART }" 22 sed -e 's/char \*/const char * const/' $source >>$target 23 done 24 echo "static const XPM_DATA $NAME[] = {$LIST 25};" >>$target 26done 27