Mercurial > hg > aboriginal
changeset 1203:ac8d9db5cf37
In the presence of multiple tarballs, use the newest one, so downloading a new version and extracting it before running cleanup_oldfiles should work now.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 10 Aug 2010 11:40:42 -0500 |
parents | 75d179a52475 |
children | 6ab5fbb82619 |
files | sources/functions.sh |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/sources/functions.sh Tue Aug 10 11:00:33 2010 -0500 +++ b/sources/functions.sh Tue Aug 10 11:40:42 2010 -0500 @@ -169,7 +169,7 @@ echo "$1" | sed -e 's/-*\(\([0-9\.]\)*\([_-]rc\)*\(-pre\)*\([0-9][a-zA-Z]\)*\)*\(\.tar\..z2*\)$/'"$2"'\6/' } -# Given a filename.tar.ext, return the versino number. +# Given a filename.tar.ext, return the version number. getversion() { @@ -219,7 +219,7 @@ # Find tarball, and determine type - FILENAME="$(echo "$SRCDIR/${PACKAGE}-"*.tar*)" + FILENAME="$(echo -n "$SRCDIR/"; cd "$SRCDIR"; ls -tc "${PACKAGE}-"*.tar* | head -n 1)" DECOMPRESS="" [ "$FILENAME" != "${FILENAME/%\.tar\.bz2/}" ] && DECOMPRESS="j" [ "$FILENAME" != "${FILENAME/%\.tar\.gz/}" ] && DECOMPRESS="z"