summaryrefslogtreecommitdiffhomepage
path: root/build.subr
diff options
context:
space:
mode:
Diffstat (limited to 'build.subr')
-rw-r--r--build.subr11
1 files changed, 10 insertions, 1 deletions
diff --git a/build.subr b/build.subr
index 98992408..48560774 100644
--- a/build.subr
+++ b/build.subr
@@ -58,11 +58,20 @@ export_vars_subst() {
};
fetch_git() {
- rm_if_exists ${1};
+ [ ${ARG_NO_DOWNLOAD:-0} -eq 0 ] &&\
+ rm_if_exists ${1};
[ -d ${1} ] && (cd ${1} && git pull origin main)\
|| git clone ${3} ${2} ${1};
};
+find_with_no_paths() {
+ for _fwnp_not_path in ${1}; do
+ _fwnp_args="${_fwnp_args:+${_fwnp_args} }-not -path ./${_fwnp_not_path} -not -path ./${_fwnp_not_path}/*";
+ done; shift;
+ set -f; find "${@}" ${_fwnp_args}; _rc=${?}; set +f;
+ unset _fwnp_args _fwnp_not_path; return ${_rc};
+};
+
rm_if_exists() {
[ -z "${1#-m}" ] && { _rie_arg_m=1; shift; };
[ -z "${1#-c}" ] && { _rie_arg_c=1; shift; };