2004-01-07 21:07:12 +00:00
|
|
|
#!/bin/sh
|
2003-07-02 05:22:47 +00:00
|
|
|
|
2004-04-19 22:51:57 +00:00
|
|
|
LANG=C
|
|
|
|
export LANG
|
|
|
|
LC_COLLATE=C
|
|
|
|
export LC_COLLATE
|
|
|
|
|
2004-01-07 21:07:12 +00:00
|
|
|
Template=$1;
|
|
|
|
srcfile=$2;
|
2003-07-02 05:22:47 +00:00
|
|
|
|
2004-01-07 21:07:12 +00:00
|
|
|
if test x"$1" = x ; then
|
|
|
|
echo "$0 Objectname [srcfile]\n";
|
|
|
|
echo " creates gstobjectname.{c,h} implementing GstObjectname,\n";
|
|
|
|
echo " subclassing GstVideofilter.\n";
|
|
|
|
exit 1;
|
|
|
|
fi
|
2003-07-02 05:22:47 +00:00
|
|
|
|
2004-01-07 21:07:12 +00:00
|
|
|
if test x"$2" = x ; then
|
|
|
|
srcfile="gstvideotemplate.c"
|
|
|
|
fi
|
2003-07-02 05:22:47 +00:00
|
|
|
|
2004-03-09 20:55:30 +00:00
|
|
|
id=`echo '$Id$' | sed \
|
|
|
|
-e 's/\$I[d]: \([^$]*\)\$/\1/g'`
|
2004-01-07 21:33:01 +00:00
|
|
|
echo $id
|
2003-07-02 05:22:47 +00:00
|
|
|
|
2004-04-19 22:51:57 +00:00
|
|
|
TEMPLATE=`echo $Template | tr [:lower:] [:upper:]`
|
|
|
|
template=`echo $Template | tr [:upper:] [:lower:]`
|
2003-07-02 05:22:47 +00:00
|
|
|
|
2004-01-07 21:07:12 +00:00
|
|
|
# remember to break up the Id: in the line below
|
|
|
|
sed \
|
2004-01-07 21:33:01 +00:00
|
|
|
-e 's/gstvideotemplate\.c/SOURCEFILE/g' \
|
2004-01-07 21:07:12 +00:00
|
|
|
-e "s/Videotemplate/$Template/g" \
|
|
|
|
-e "s/videotemplate/$template/g" \
|
|
|
|
-e "s/VIDEOTEMPLATE/$TEMPLATE/g" \
|
2004-01-07 21:33:01 +00:00
|
|
|
-e 's/\$I[d]: \([^$]*\)\$/\1/g' \
|
|
|
|
-e 's/SOURCEFILE/gstvideotemplate\.c/g' \
|
|
|
|
-e "s%MAKEFILTERVERSION%$id%g" \
|
|
|
|
$srcfile >gst$template.c.tmp && mv gst$template.c.tmp gst$template.c
|
2003-07-02 05:22:47 +00:00
|
|
|
|