summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-08-28 11:35:20 +1000
committerDan McGee <dan@archlinux.org>2012-09-18 08:40:44 -0500
commit306c274239728a6307c06038e51f70ed904ba84b (patch)
treee343111d8d4bf1fec5d39d991be4170b66c99adb /scripts/makepkg.sh.in
parent7a4f76c2afd787429a4b0e5fd3b4558216f92bd4 (diff)
downloadpacman-306c274239728a6307c06038e51f70ed904ba84b.tar.xz
makepkg: always check makepkg.conf for match to download protocol
The list of which download protocol should look in makepkg.conf for the download agent was hard coded into makepkg. Instead, fallback to checking the the download agents array for any non-local or (implemented) vcs source. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in9
1 files changed, 2 insertions, 7 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index cad1f5ee..7e5aa959 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -284,7 +284,7 @@ get_downloadclient() {
# if we didn't find an agent, return an error
if [[ -z $agent ]]; then
- error "$(gettext "There is no agent set up to handle %s URLs. Check %s.")" "$proto" "$MAKEPKG_CONF"
+ error "$(gettext "Unknown download protocol: %s")" "$proto"
plain "$(gettext "Aborting...")"
exit 1 # $E_CONFIG_ERROR
fi
@@ -596,9 +596,6 @@ download_sources() {
local)
download_local "$netfile"
;;
- ftp|http|https|rsync|scp)
- download_file "$netfile"
- ;;
git*)
(( GET_VCS )) && download_git "$netfile"
;;
@@ -609,9 +606,7 @@ download_sources() {
(( GET_VCS )) && download_svn "$netfile"
;;
*)
- error "$(gettext "Unknown download protocol: %s")" "$proto"
- plain "$(gettext "Aborting...")"
- exit 1
+ download_file "$netfile"
;;
esac
done