From 9c817b654996249b8022e189ee7e2692f4668431 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Mon, 28 May 2018 23:30:29 -0400 Subject: 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 --- scripts/libmakepkg/source/svn.sh.in | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/libmakepkg/source/svn.sh.in') 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#*#} -- cgit v1.2.3-24-g4f1b