Fix the regular expressions and quote properly
authorDavid Schleef <ds@schleef.org>
Wed, 7 Jan 2004 21:33:01 +0000 (21:33 +0000)
committerDavid Schleef <ds@schleef.org>
Wed, 7 Jan 2004 21:33:01 +0000 (21:33 +0000)
Original commit message from CVS:
Fix the regular expressions and quote properly

gst/videofilter/make_filter

index 481f8ed..5eec96a 100755 (executable)
@@ -14,19 +14,22 @@ if test x"$2" = x ; then
        srcfile="gstvideotemplate.c"
 fi
 
-id=$(echo '$Id$I[d]: \(.*\)\$/\1/g" )
+id=$(echo '$Id$' | sed \
+       -e 's/\$I[d]: \([^$]*\)\$/\1/g' \
+       )
+echo $id
 
 TEMPLATE=$(echo $Template | tr a-z A-Z)
 template=$(echo $Template | tr A-Z a-z)
 
 # remember to break up the Id: in the line below
 sed \
-       -e "s/gstvideotemplate\.c/SOURCEFILE/g" \
+       -e 's/gstvideotemplate\.c/SOURCEFILE/g' \
        -e "s/Videotemplate/$Template/g" \
        -e "s/videotemplate/$template/g" \
        -e "s/VIDEOTEMPLATE/$TEMPLATE/g" \
-       -e "s/\$I[d]: \(.*\)\$/\1/g" \
-       -e "s/SOURCEFILE/gstvideotemplate\.c/g" \
-       -e "s/MAKEFILTERVERSION/$id/g" \
-       $srcfile >gst$template.c
+       -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