From 164ef212527927f58230e5f2e4adbba229280be9 Mon Sep 17 00:00:00 2001 From: Frederic Marchal Date: Sat, 12 Jan 2013 10:28:39 +0100 Subject: [PATCH] Make sure the configure script is up to date when packaging the project The configure script must exist and have been updated by autoreconf before sarg can be released. --- archive.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/archive.sh b/archive.sh index 9a8da29..6e3b582 100755 --- a/archive.sh +++ b/archive.sh @@ -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" -- 2.47.3