blob: 692d0d5263e958d8405689c7550389ea839206c3 [file] [log] [blame]
David Schleeff3961002004-01-07 21:07:12 +00001#!/bin/sh
David Schleef23e47de2003-07-02 05:22:47 +00002
David Schleef11d1c742004-04-19 22:51:57 +00003LANG=C
4export LANG
5LC_COLLATE=C
6export LC_COLLATE
7
David Schleeff3961002004-01-07 21:07:12 +00008Template=$1;
9srcfile=$2;
David Schleef23e47de2003-07-02 05:22:47 +000010
David Schleeff3961002004-01-07 21:07:12 +000011if 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;
16fi
David Schleef23e47de2003-07-02 05:22:47 +000017
David Schleeff3961002004-01-07 21:07:12 +000018if test x"$2" = x ; then
19 srcfile="gstvideotemplate.c"
20fi
David Schleef23e47de2003-07-02 05:22:47 +000021
David Schleef1e292a52004-03-09 20:55:30 +000022id=`echo '$Id$' | sed \
23 -e 's/\$I[d]: \([^$]*\)\$/\1/g'`
David Schleef6f002622004-01-07 21:33:01 +000024echo $id
David Schleef23e47de2003-07-02 05:22:47 +000025
David Schleef11d1c742004-04-19 22:51:57 +000026TEMPLATE=`echo $Template | tr [:lower:] [:upper:]`
27template=`echo $Template | tr [:upper:] [:lower:]`
David Schleef23e47de2003-07-02 05:22:47 +000028
David Schleeff3961002004-01-07 21:07:12 +000029# remember to break up the Id: in the line below
30sed \
David Schleef6f002622004-01-07 21:33:01 +000031 -e 's/gstvideotemplate\.c/SOURCEFILE/g' \
David Schleeff3961002004-01-07 21:07:12 +000032 -e "s/Videotemplate/$Template/g" \
33 -e "s/videotemplate/$template/g" \
34 -e "s/VIDEOTEMPLATE/$TEMPLATE/g" \
David Schleef6f002622004-01-07 21:33:01 +000035 -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 Schleef23e47de2003-07-02 05:22:47 +000039