5 # Updates a module's README and MAINTAINERS files from the copy in the
8 README_FILES="README README.static-linking MAINTAINERS"
10 if [ ! -f "common/update-readmes" -o ! -f configure.ac ]; then
11 echo "Run ./common/update-readmes from the top-level source directory of a GStreamer module";
15 MAJOR_VERSION=`grep '^AC_INIT' configure.ac | sed -e 's/[^0-9]*\([0-9]\)\.\([0-9]*\).*/\1/'`
16 MINOR_VERSION=`grep '^AC_INIT' configure.ac | sed -e 's/[^0-9]*\([0-9]\)\.\([0-9]*\).*/\2/'`
18 if test x$MAJOR_VERSION = x -o x$MINOR_VERSION = x ; then
19 echo "Failed to extract major/minor version";
23 let m=$MINOR_VERSION%2
25 SERIES_VERSION="$MAJOR_VERSION.$MINOR_VERSION.x stable series"
27 SERIES_VERSION="$MAJOR_VERSION.$MINOR_VERSION.x development series"
29 #echo "$SERIES_VERSION"
31 for f in $README_FILES ; do
32 cp --preserve "common/$f" $f || {
33 echo "Failed to update $f"
38 sed -i "s/@SERIES_VERSION@/$SERIES_VERSION/g" README
40 if test x$1 = "x--run-git-add"; then
41 git add $README_FILES;