"Fossies" - the Fresh Open Source Software Archive

Member "xterm-379/icons/make-xpms" (7 Oct 2012, 774 Bytes) of package /linux/misc/xterm-379.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    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