2004-01-16 00:55:29 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
Template=$1;
|
|
|
|
srcfile=$2;
|
|
|
|
|
|
|
|
if test x"$1" = x ; then
|
|
|
|
echo "$0 Objectname [srcfile]\n";
|
|
|
|
echo " creates gstobjectname.{c,h} implementing GstObjectname,\n";
|
|
|
|
echo " subclassing GstAudiofilter.\n";
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x"$2" = x ; then
|
|
|
|
srcfile="gstaudiofiltertemplate.c"
|
|
|
|
fi
|
|
|
|
|
2004-03-09 20:55:30 +00:00
|
|
|
id=`echo '$Id$' | sed \
|
|
|
|
-e 's/\$I[d]: \([^$]*\)\$/\1/g'`
|
2004-01-16 00:55:29 +00:00
|
|
|
echo $id
|
|
|
|
|
2004-03-09 20:55:30 +00:00
|
|
|
TEMPLATE=`echo $Template | tr a-z A-Z`
|
|
|
|
template=`echo $Template | tr A-Z a-z`
|
2004-01-16 00:55:29 +00:00
|
|
|
|
|
|
|
# remember to break up the Id: in the line below
|
|
|
|
sed \
|
|
|
|
-e 's/gstaudiofiltertemplate\.c/SOURCEFILE/g' \
|
|
|
|
-e "s/AudiofilterTemplate/$Template/g" \
|
|
|
|
-e "s/audiofiltertemplate/$template/g" \
|
|
|
|
-e "s/VIDEOFILTERTEMPLATE/$TEMPLATE/g" \
|
|
|
|
-e 's/\$I[d]: \([^$]*\)\$/\1/g' \
|
|
|
|
-e 's/SOURCEFILE/gstaudiofiltertemplate\.c/g' \
|
|
|
|
-e "s%MAKEFILTERVERSION%$id%g" \
|
|
|
|
$srcfile >gst$template.c.tmp && mv gst$template.c.tmp gst$template.c
|
|
|
|
|