summaryrefslogtreecommitdiffstats
path: root/scripts/libmakepkg/source/svn.sh.in
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2018-05-29 05:30:29 +0200
committerAllan McRae <allan@archlinux.org>2019-01-22 00:38:31 +0100
commit9c817b654996249b8022e189ee7e2692f4668431 (patch)
treea1473a326760a261a671dfd7af354be1e7f1a451 /scripts/libmakepkg/source/svn.sh.in
parentac0e21a6df65c3770920be39b3fe14d8b49f637b (diff)
downloadpacman-9c817b654996249b8022e189ee7e2692f4668431.tar.gz
pacman-9c817b654996249b8022e189ee7e2692f4668431.tar.xz
libmakepkg: implement extendable source protocols
Lookup the existence of matching functions for each protocol, and fallback on the generic file handler. New source protocols can then be added via thirdparty libmakepkg drop-ins without requiring modifications to source.sh Fixes FS#49076 Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/libmakepkg/source/svn.sh.in')
-rw-r--r--scripts/libmakepkg/source/svn.sh.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/libmakepkg/source/svn.sh.in b/scripts/libmakepkg/source/svn.sh.in
index f98779f2..48f4f24e 100644
--- a/scripts/libmakepkg/source/svn.sh.in
+++ b/scripts/libmakepkg/source/svn.sh.in
@@ -29,6 +29,11 @@ source "$LIBRARY/util/pkgbuild.sh"
download_svn() {
+ # abort early if parent says not to fetch
+ if declare -p get_vcs > /dev/null 2>&1; then
+ (( get_vcs )) || return
+ fi
+
local netfile=$1
local fragment=${netfile#*#}