diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-05-11 10:39:07 +0100 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-05-11 10:39:07 +0100 |
commit | cb9a055f42c023f527e4f97d1a3ec80a44729cf2 (patch) | |
tree | 1f9ebe04188154fccb0ecf2d265cc394057d482f /subr/rtl_fileop.subr | |
parent | bbb50c0f1c15dab6893cfcf695b2a269c41baa62 (diff) | |
download | midipix_build-cb9a055f42c023f527e4f97d1a3ec80a44729cf2.tar.bz2 midipix_build-cb9a055f42c023f527e4f97d1a3ec80a44729cf2.tar.xz |
subr/build_init.subr:buildp_init_{args,getopts}(): call rtl_fileop_set_log() as soon as possible.
subr/ex_pkg.subr:ex_pkg_load_vars(): log variable file names at `notice' level.
subr/rtl_fileop.subr:rtl_fileop(): implements `source'.
Diffstat (limited to 'subr/rtl_fileop.subr')
-rw-r--r-- | subr/rtl_fileop.subr | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/subr/rtl_fileop.subr b/subr/rtl_fileop.subr index 64538c59..dd82311e 100644 --- a/subr/rtl_fileop.subr +++ b/subr/rtl_fileop.subr @@ -92,7 +92,7 @@ rtl_fileop() { rtlp_fileop_log "Moving \`${1}' to \`${2}' w/ -fs"; mv -f -- "${1}" "${2}"; _rc="${?}"; fi; ;; - mkdir|mkfifo|rm|source_opt|test|touch) + mkdir|mkfifo|rm|source|source_opt|test|touch) while [ \( "${?}" -eq 0 \) -a \( ""${#}"" -gt 0 \) ]; do if [ -z "${1}" ]; then rtl_log_msg fatalexit "Missing parameters (in: %s %s.)" "${_op}" "${*}"; @@ -117,6 +117,10 @@ rtl_fileop() { && rtlp_fileop_check "${PREFIX:-}" "${1}"; then rtlp_fileop_log "Removing directory or file \`${1}'."; rm -rf -- "${1}"; _rc="${?}"; + elif [ "${_op}" = source ]\ + && rtlp_fileop_check "${PREFIX:-}" "${1}"; then + rtlp_fileop_log "Sourcing file \`${1}'."; + . "${1}"; _rc="${?}"; elif [ "${_op}" = source_opt ]\ && rtl_fileop test "${1}"\ && rtlp_fileop_check "${PREFIX:-}" "${1}"; then |