summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
author <shinichiro.hamaji@gmail.com>2008-11-04 07:09:16 +0000
committer <shinichiro.hamaji@gmail.com>2008-11-04 07:09:16 +0000
commit62a67b25167a56a723e2e420cc80168905e5e2cb (patch)
tree649427ac6b7a664dd6a9361ac1eb4afe1f4b5ece /packages
parent1ea4ad6ba1df3fdab43d7350795741ce27a5e9fd (diff)
downloadglog-62a67b25167a56a723e2e420cc80168905e5e2cb.tar.gz
glog-62a67b25167a56a723e2e420cc80168905e5e2cb.tar.bz2
glog-62a67b25167a56a723e2e420cc80168905e5e2cb.zip
Utilize the second parameter (version number) for deb.sh.
The original way (ls && tail -n 1) could not handle version numbers which have patch level proprely (e.g., 0.1.1.tar.gz is considered less than 0.1.tar.gz since ls command orders files lexicographically). git-svn-id: https://google-glog.googlecode.com/svn/trunk@15 eb4d4688-79bd-11dd-afb4-1d65580434c0
Diffstat (limited to 'packages')
-rwxr-xr-xpackages/deb.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/deb.sh b/packages/deb.sh
index ced98fa..e6f4aca 100755
--- a/packages/deb.sh
+++ b/packages/deb.sh
@@ -12,6 +12,7 @@ LIB=
#LIB=lib
PACKAGE="$1"
+VERSION="$2"
# We can only build Debian packages, if the Debian build tools are installed
if [ \! -x /usr/bin/debuild ]; then
@@ -30,7 +31,7 @@ fi
topdir="${PWD%/*}"
# Find the tar archive built by "make dist"
-archive="$(basename "$(ls -1 ${topdir}/$PACKAGE*.tar.gz | tail -n 1)" .tar.gz)"
+archive="$PACKAGE-$VERSION"
if [ -z "${archive}" ]; then
echo "Cannot find ../$PACKAGE*.tar.gz. Run \"make dist\" first." 1>&2
exit 0