ext/lcs/Makefile.am: Fix so that the lcs colorspace plugin doesn't conflict with...
[platform/upstream/gst-plugins-good.git] / gst / videofilter / make_filter
1 #!/bin/sh
2
3 Template=$1;
4 srcfile=$2;
5
6 if test x"$1" = x ; then
7         echo "$0 Objectname [srcfile]\n";
8         echo "  creates gstobjectname.{c,h} implementing GstObjectname,\n";
9         echo "  subclassing GstVideofilter.\n";
10         exit 1;
11 fi
12
13 if test x"$2" = x ; then
14         srcfile="gstvideotemplate.c"
15 fi
16
17 id=`echo '$Id$' | sed \
18         -e 's/\$I[d]: \([^$]*\)\$/\1/g'`
19 echo $id
20
21 TEMPLATE=`echo $Template | tr a-z A-Z`
22 template=`echo $Template | tr A-Z a-z`
23
24 # remember to break up the Id: in the line below
25 sed \
26         -e 's/gstvideotemplate\.c/SOURCEFILE/g' \
27         -e "s/Videotemplate/$Template/g" \
28         -e "s/videotemplate/$template/g" \
29         -e "s/VIDEOTEMPLATE/$TEMPLATE/g" \
30         -e 's/\$I[d]: \([^$]*\)\$/\1/g' \
31         -e 's/SOURCEFILE/gstvideotemplate\.c/g' \
32         -e "s%MAKEFILTERVERSION%$id%g" \
33         $srcfile >gst$template.c.tmp && mv gst$template.c.tmp gst$template.c
34