summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-07-24 06:42:29 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-07-24 06:42:29 (GMT)
commitadc71fffcc4f9ba8c4544f208bbf569f93546940 (patch)
tree66ceee5bf7d00c3206451a2966a38ec6c51b1391 /scripts
parentf4f3f526b8c29dee950adf99b4f66db59537fe89 (diff)
When retrieving a file, allow preferred extension to be whatever starts with a dot, and not only one of .tar.bz2 .tar.gz .tgz or .tar.
/trunk/scripts/functions | 5 3 2 0 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/functions5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/functions b/scripts/functions
index 9ec0693..3f7f941 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -334,9 +334,10 @@ CT_GetFile() {
local file="$1"
local first_ext=""
shift
+ # If next argument starts with a dot, then this is not an URL,
+ # and we can consider that it is a preferred extension.
case "$1" in
- .tar.bz2|.tar.gz|.tgz|.tar)
- first_ext="$1"
+ .*) first_ext="$1"
shift
;;
esac