diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-08-20 11:13:59 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-08-24 23:03:13 -0400 |
commit | a8afb74a1f37af6afae3ce75db5e4e89b1a749f9 (patch) | |
tree | 88a1074d39dfb2a3d6a44789fbe123a01a600187 /scripts | |
parent | b565414e7f5f01afb8787db1cc8509b6b2c9756f (diff) |
makepkg: do blob expansion in DLAGENTS maps
This allows vcs-* schemes to be used for vcsget.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/makepkg.sh.in | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index b30e9d04..971a8b2a 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -394,16 +394,25 @@ source_has_signatures() { return 1 } +string_matches_blob() { + local string=$1 + local blob=$2 + case "$string" in + $blob) return 0;; + esac + return 1 +} + get_downloadclient() { # $1 = URL with valid protocol prefix local url=$1 local proto="${url%%://*}" - # loop through DOWNLOAD_AGENTS variable looking for protocol + # loop through DLAGENTS (download agents) variable looking for protocol local i for i in "${DLAGENTS[@]}"; do local handler="${i%%::*}" - if [[ $proto = "$handler" ]]; then + if string_matches_blob "$string" "$handler"; then local agent="${i##*::}" break fi |