FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 08-25-2012, 05:36 PM
Luke Shumaker
 
Default makepkg: do glob expansion in DLAGENTS maps

This allows vcs-* schemes to be used for vcsget.

Signed-off-by: Luke Shumaker <LukeShu@sbcglobal.net>
---
scripts/makepkg.sh.in | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index b30e9d0..f2a5008 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -394,16 +394,25 @@ source_has_signatures() {
return 1
}

+string_matches_glob() {
+ local string=$1
+ local glob=$2
+ case "$string" in
+ $glob) 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_glob "$proto" "$handler"; then
local agent="${i##*::}"
break
fi
--
1.7.12
 
Old 08-25-2012, 05:37 PM
Luke Shumaker
 
Default makepkg: do glob expansion in DLAGENTS maps

This allows vcs-* schemes to be used for vcsget.

Signed-off-by: Luke Shumaker <LukeShu@sbcglobal.net>
---
scripts/makepkg.sh.in | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index b30e9d0..f2a5008 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -394,16 +394,25 @@ source_has_signatures() {
return 1
}

+string_matches_glob() {
+ local string=$1
+ local glob=$2
+ case "$string" in
+ $glob) 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_glob "$proto" "$handler"; then
local agent="${i##*::}"
break
fi
--
1.7.12
 

Thread Tools




All times are GMT. The time now is 05:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org