@@ -43,8 +43,16 @@ _on_error() {
exec "${myname}" "${OPTS[@]}" || exit ${ret}
}
+feature_requested() {
+ local feature="${1}"
+ local features_requested="${2}"
+
+ grep -qow "${feature}" <<<"${features_requested}"
+}
+
verbose=
recurse=0
+features=
while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
case "${OPT}" in
q) verbose=-q; exec >/dev/null;;
@@ -54,6 +62,7 @@ while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do
c) cset="${OPTARG}";;
d) dl_dir="${OPTARG}";;
n) basename="${OPTARG}";;
+ x) features="${OPTARG}";;
:) printf "option '%s' expects a mandatory argument\n" "${OPTARG}"; exit 1;;
\?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;;
esac
@@ -75,6 +84,9 @@ _git() {
eval GIT_DIR="${git_cache}/.git" ${GIT} "${@}"
}
+# check for requested features we support
+if feature_requested "submodules" "${features}"; then recurse=1; fi
+
# Create a warning file, that the user should not use the git cache.
# It's ours. Our precious.
cat <<-_EOF_ >"${dl_dir}/git.readme"
Initial support is limited to submodules. Signed-off-by: Vincent Fazio <vfazio@xes-inc.com> --- support/download/git | 12 ++++++++++++ 1 file changed, 12 insertions(+)