[nautilus-actions] tools/release-tarball.sh: fix stable attribute computing



commit 9c60da0756cc92cb75e18e6240e5c985ac58a368
Author: Pierre Wieser <pwieser trychlos org>
Date:   Mon Mar 12 06:11:01 2012 +0100

    tools/release-tarball.sh: fix stable attribute computing

 ChangeLog                |    2 ++
 tools/release-tarball.sh |    7 ++++++-
 2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4e41cbe..fd920e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2012-03-12 Pierre Wieser <pwieser trychlos org>
 
+	* tools/release-tarball.sh: Fix stable attribute computing.
+
 	* configure.ac: Post release version bump.
 
 2012-03-04 Pierre Wieser <pwieser trychlos org>
diff --git a/tools/release-tarball.sh b/tools/release-tarball.sh
index fc3c073..7cd557d 100755
--- a/tools/release-tarball.sh
+++ b/tools/release-tarball.sh
@@ -133,7 +133,12 @@ is_stable()
 {
 	typeset _version="$(get_version ${1})"
 	typeset _minor=$(echo ${_version} | cut -d. -f2)
-	typeset -i _rest=${_minor}%2
+	typeset -i _rest
+	if [ -z "${_minor}" ]; then
+		_rest=0
+	else
+		_rest=${_minor}%2
+	fi
 	typeset _stable
 	[ ${_rest} -eq 0 ] && _stable="yes" || _stable="no"
 	echo "${_stable}"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]