diff options
Diffstat (limited to 'build.subr')
-rw-r--r-- | build.subr | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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; }; |