Home | History | Annotate | Line # | Download | only in icons
      1 #!/bin/sh
      2 # $XTermId: make-xpms,v 1.6 2012/10/07 22:50:56 tom Exp $
      3 # some files are generated from other icons...
      4 for name in mini.xterm filled-xterm xterm xterm-color
      5 do
      6 	target=${name}.xpms
      7 	NAME=`echo "$target" | sed -e 's/[\.-]/_/g'`
      8 	LIST=
      9 	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
     26 done
     27