Commit 88e512ca authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠
Browse files

update-readmes: extract version from

parent f32031c0
......@@ -22,6 +22,8 @@ You can subscribe to our mailing lists:
Follow us on Twitter:
We track bugs, feature requests and merge requests (patches) in GitLab at
# Check that the code follows a consistant code style
# Check that the code follows a consistent code style
# Check for existence of indent, and error out if not present.
......@@ -7,13 +7,13 @@
if [ ! -f "common/update-readmes" -o ! -f ]; then
if [ ! -f "common/update-readmes" -o ! -f meson_options.txt ]; then
echo "Run ./common/update-readmes from the top-level source directory of a GStreamer module";
exit 1;
MAJOR_VERSION=`grep '^AC_INIT' | sed -e 's/[^0-9]*\([0-9]\)\.\([0-9]*\).*/\1/'`
MINOR_VERSION=`grep '^AC_INIT' | sed -e 's/[^0-9]*\([0-9]\)\.\([0-9]*\).*/\2/'`
MAJOR_VERSION=`head -n 5 | grep -e '^\s*version\s*:' | sed -e "s%^\s*version\s*:\s*'%%" -e "s%',%%" | sed -e 's/[^0-9]*\([0-9]\)\.\([0-9]*\).*/\1/'`
MINOR_VERSION=`head -n 5 | grep -e '^\s*version\s*:' | sed -e "s%^\s*version\s*:\s*'%%" -e "s%',%%" | sed -e 's/[^0-9]*\([0-9]\)\.\([0-9]*\).*/\2/'`
if test x$MAJOR_VERSION = x -o x$MINOR_VERSION = x ; then
echo "Failed to extract major/minor version";
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment