This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
[PATCH] configure: replace bashisms with POSIX shell
- From: Mike Frysinger <vapier at gentoo dot org>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Mon, 03 Oct 2011 18:00:48 -0400
- Subject: [PATCH] configure: replace bashisms with POSIX shell
The ${var/} pattern substitution is a bashism and not part of POSIX.
Convert it to use `tr` instead.
The $[...] syntax is also a bashism, so convert it to the POSIX way
of doing math with $(( ... )).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
configure.ac | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index f792d43..a9f1fc9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -252,7 +252,7 @@ AC_SUBST([eu_version])
# 1.234<whatever> -> 1234<whatever>
case "$PACKAGE_VERSION" in
-[[0-9]].*) eu_version="${PACKAGE_VERSION/./}" ;;
+[[0-9]].*) eu_version=`echo "${PACKAGE_VERSION}" | tr -d .` ;;
*) AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;;
esac
case "$eu_version" in
@@ -281,6 +281,6 @@ case "$eu_version" in
esac
# Round up to the next release API (x.y) version.
-[eu_version=$[($eu_version + 999) / 1000]]
+eu_version=$(( (eu_version + 999) / 1000 ))
AC_OUTPUT
--
1.7.6.1