Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=f1b199c5260604e625f9d2f3b435c978b0f20427

commit f1b199c5260604e625f9d2f3b435c978b0f20427
Author: Michel Hermier <herm...@frugalware.org>
Date:   Sun Jan 23 08:55:14 2011 +0100

util.sh

* Introduce Flastdir and Flastverdir. While Flastdir checks version dir
with regular archive name scheme ('/bar/foo-1.2.3/'), Flastverdir only
checks for version numbers only directory ('/foo/1.2.3/')

diff --git a/source/include/util.sh b/source/include/util.sh
index 646a484..2f6b357 100644
--- a/source/include/util.sh
+++ b/source/include/util.sh
@@ -1211,6 +1211,28 @@ Flastarchive() {
}

###
+# * Flastdir(): A convenience function to Flastarchive for directories.
+# Parameters: 1) url (optional) see Flastarchive
+###
+Flastdir() {
+       if [ -z "$1" ]; then
+               Flastarchive '/'
+       else
+               # The trailing '/' in the url is here to avoid a redirection
+               # bug in Fwcat.
+               Flastarchive "$1/" '/'
+       fi
+}
+
+###
+# * Flastverdir(): A convenience function to Flastdir for version only
+# directories. Parameters: 1) url (optional) see Flastdir
+###
+Flastverdir() {
+       pkgname='' Fpkgversep='' _F_archive_name='' Flastdir "$1"
+}
+
+###
# * Flasttar(): A convenience function to Flastarchive for all the known tar
# ball extension. Parameters: 1) url (optional) see Flastarchive
###
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to