]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Make sure the configure script is up to date when packaging the project
authorFrederic Marchal <fmarchal@users.sourceforge.net>
Sat, 12 Jan 2013 09:28:39 +0000 (10:28 +0100)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Sat, 12 Jan 2013 09:28:39 +0000 (10:28 +0100)
The configure script must exist and have been updated by autoreconf before
sarg can be released.

archive.sh

index 9a8da29ffc4c1854d0d69a75537e40b578c4c595..6e3b58219551bc6c367a7f1589a52536e7575c1d 100755 (executable)
@@ -16,12 +16,24 @@ if [ -z "$Revision" ] ; then
 fi
 Version="$Version.$Revision"
 
-VersionCheck=$(cat "$Sources/configure.in" | sed -n -e 's/^AC_INIT(\[sarg\],\[\([0-9][0-9]*\.[0-9][0-9]*.*\)\])/\1/p')
+VersionCheck=$(sed -n -e 's/^AC_INIT(\[sarg\],\[\([0-9][0-9]*\.[0-9][0-9]*.*\)\])/\1/p' "$Sources/configure.in")
 if [ "x$Version" != "x$VersionCheck" ] ; then
        echo "CMakeLists and configure doesn't refer to the same version"
        exit 1
 fi
 
+if [ ! -f "$Sources/configure" ] ; then
+       echo "Configure script not created"
+       exit 1
+fi
+
+ConfigureCheck=$(sed -n -e "s/^PACKAGE_VERSION='\([0-9][0-9]*\.[0-9][0-9]*.*\)'/\1/p" "$Sources/configure")
+if [ "x$Version" != "x$ConfigureCheck" ] ; then
+       echo "Configure script not updated"
+       echo "Run autoreconf"
+       exit 1
+fi
+
 # update the po files
 if ( ! make update-po ) ; then
        echo "Failed to update the po files"