David Schleef | f396100 | 2004-01-07 21:07:12 +0000 | [diff] [blame] | 1 | #!/bin/sh |
David Schleef | 23e47de | 2003-07-02 05:22:47 +0000 | [diff] [blame] | 2 | |
David Schleef | 11d1c74 | 2004-04-19 22:51:57 +0000 | [diff] [blame] | 3 | LANG=C |
| 4 | export LANG |
| 5 | LC_COLLATE=C |
| 6 | export LC_COLLATE |
| 7 | |
David Schleef | f396100 | 2004-01-07 21:07:12 +0000 | [diff] [blame] | 8 | Template=$1; |
| 9 | srcfile=$2; |
David Schleef | 23e47de | 2003-07-02 05:22:47 +0000 | [diff] [blame] | 10 | |
David Schleef | f396100 | 2004-01-07 21:07:12 +0000 | [diff] [blame] | 11 | if test x"$1" = x ; then |
| 12 | echo "$0 Objectname [srcfile]\n"; |
| 13 | echo " creates gstobjectname.{c,h} implementing GstObjectname,\n"; |
| 14 | echo " subclassing GstVideofilter.\n"; |
| 15 | exit 1; |
| 16 | fi |
David Schleef | 23e47de | 2003-07-02 05:22:47 +0000 | [diff] [blame] | 17 | |
David Schleef | f396100 | 2004-01-07 21:07:12 +0000 | [diff] [blame] | 18 | if test x"$2" = x ; then |
| 19 | srcfile="gstvideotemplate.c" |
| 20 | fi |
David Schleef | 23e47de | 2003-07-02 05:22:47 +0000 | [diff] [blame] | 21 | |
David Schleef | 1e292a5 | 2004-03-09 20:55:30 +0000 | [diff] [blame] | 22 | id=`echo '$Id$' | sed \ |
| 23 | -e 's/\$I[d]: \([^$]*\)\$/\1/g'` |
David Schleef | 6f00262 | 2004-01-07 21:33:01 +0000 | [diff] [blame] | 24 | echo $id |
David Schleef | 23e47de | 2003-07-02 05:22:47 +0000 | [diff] [blame] | 25 | |
David Schleef | 11d1c74 | 2004-04-19 22:51:57 +0000 | [diff] [blame] | 26 | TEMPLATE=`echo $Template | tr [:lower:] [:upper:]` |
| 27 | template=`echo $Template | tr [:upper:] [:lower:]` |
David Schleef | 23e47de | 2003-07-02 05:22:47 +0000 | [diff] [blame] | 28 | |
David Schleef | f396100 | 2004-01-07 21:07:12 +0000 | [diff] [blame] | 29 | # remember to break up the Id: in the line below |
| 30 | sed \ |
David Schleef | 6f00262 | 2004-01-07 21:33:01 +0000 | [diff] [blame] | 31 | -e 's/gstvideotemplate\.c/SOURCEFILE/g' \ |
David Schleef | f396100 | 2004-01-07 21:07:12 +0000 | [diff] [blame] | 32 | -e "s/Videotemplate/$Template/g" \ |
| 33 | -e "s/videotemplate/$template/g" \ |
| 34 | -e "s/VIDEOTEMPLATE/$TEMPLATE/g" \ |
David Schleef | 6f00262 | 2004-01-07 21:33:01 +0000 | [diff] [blame] | 35 | -e 's/\$I[d]: \([^$]*\)\$/\1/g' \ |
| 36 | -e 's/SOURCEFILE/gstvideotemplate\.c/g' \ |
| 37 | -e "s%MAKEFILTERVERSION%$id%g" \ |
| 38 | $srcfile >gst$template.c.tmp && mv gst$template.c.tmp gst$template.c |
David Schleef | 23e47de | 2003-07-02 05:22:47 +0000 | [diff] [blame] | 39 | |