diff options
Diffstat (limited to 'get_versions')
-rwxr-xr-x | get_versions | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/get_versions b/get_versions new file mode 100755 index 0000000..c5b2346 --- /dev/null +++ b/get_versions @@ -0,0 +1,12 @@ +#!/bin/sh +for i in "$@"; do + version=`sed -n '/^AC_INIT *(/s/^[^,]*, *\[//p' $i/configure.ac | sed 's/\].*$//'` + name=`echo ${i}_VERSION | tr 'a-z' 'A-Z'` + echo "$name=$version" + echo "AC_SUBST($name)" + for pc in $i/*.pc.in; do + if [ -f "$pc" ]; then + sed -i "s/PACKAGE_VERSION/$name/g" $pc + fi + done +done |