summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2019-01-19 16:32:02 +0000
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2019-01-19 16:32:02 +0000
commitf0dfe17891f0b0c2e5a209e2aa8178102a07e0e2 (patch)
treee37d945843cd8cc42999f57f5a40367adf3d4dee /subr
parent20421348ca6d82791db780b3e08a6bfea15254cb (diff)
downloadmidipix_build-f0dfe17891f0b0c2e5a209e2aa8178102a07e0e2.tar.bz2
midipix_build-f0dfe17891f0b0c2e5a209e2aa8178102a07e0e2.tar.xz
build.sh, etc/build.usage, subr/build_args.subr: replaces -x w/ -vvv.
subr/ex_rtl_{fileop,log}.subr, vars/env.vars: log file operations at -vvvv.
Diffstat (limited to 'subr')
-rw-r--r--subr/build_args.subr17
-rw-r--r--subr/ex_rtl_fileop.subr20
-rw-r--r--subr/ex_rtl_log.subr3
3 files changed, 20 insertions, 20 deletions
diff --git a/subr/build_args.subr b/subr/build_args.subr
index 7f84414a..6d7c278e 100644
--- a/subr/build_args.subr
+++ b/subr/build_args.subr
@@ -15,7 +15,7 @@ BUILD_ARGS_SPEC="
ARG_VERBOSE:selfarg:-v:
ARG_VERBOSE:selfarg:-vv:
ARG_VERBOSE:selfarg:-vvv:
- ARG_XTRACE:-x:
+ ARG_VERBOSE:selfarg:-vvvv:
BUILD:arg:-b:";
build_args() {
@@ -69,15 +69,12 @@ build_args() {
fi;
ARG_RESTART="$(echo "${ARG_RESTART}" | sed "s/,/ /g")";
fi;
- if [ "${ARG_XTRACE:-0}" -eq 1 ]; then
- ARG_VERBOSE=2;
- else
- case "${ARG_VERBOSE}" in
- -v) ARG_VERBOSE=1; ;;
- -vv) ARG_VERBOSE=2; ;;
- -vvv) ARG_VERBOSE=3; ;;
- esac;
- fi;
+ case "${ARG_VERBOSE}" in
+ -v) ARG_VERBOSE=1; ;;
+ -vv) ARG_VERBOSE=2; ;;
+ -vvv) ARG_VERBOSE=3; ;;
+ -vvvv) ARG_VERBOSE=4; ;;
+ esac;
while [ ${#} -gt 0 ]; do
case "${1}" in
*=*) ex_rtl_set_var_unsafe "${1%%=*}" "${1#*=}"; ;;
diff --git a/subr/ex_rtl_fileop.subr b/subr/ex_rtl_fileop.subr
index 201d5abe..98116644 100644
--- a/subr/ex_rtl_fileop.subr
+++ b/subr/ex_rtl_fileop.subr
@@ -15,7 +15,7 @@ ex_rtl_fileop() {
cd) if [ \( -z "${1}" \) -o ! \( -L "${1}" -o -e "${1}" \) ]; then
ex_rtl_log_msg failexit "Invalid or non-existent directory \`${1}'.";
else
- ex_rtl_log_msg vvvo "Changing working directory to \`${1}'.";
+ ex_rtl_log_msg vvvv "Changing working directory to \`${1}'.";
exp_rtl_fileop_check "${PREFIX}" "${1}";
cd -- "${1}";
fi; ;;
@@ -25,7 +25,7 @@ ex_rtl_fileop() {
else
_src="${*}"; _src="${_src% *}";
_dst="${*}"; _dst="${_dst##* }";
- ex_rtl_log_msg vvvo "Copying \`${_src}' into \`${_dst}' w/ -pLR.";
+ ex_rtl_log_msg vvvv "Copying \`${_src}' into \`${_dst}' w/ -pLR.";
exp_rtl_fileop_check "${PREFIX}" "${*}";
cp -pLR -- "${@}";
fi; ;;
@@ -34,7 +34,7 @@ ex_rtl_fileop() {
else
_src="${*}"; _src="${_src% *}";
_dst="${*}"; _dst="${_dst##* }";
- ex_rtl_log_msg vvvo "Copying \`${_src}' into \`${_dst}' w/ -pPR.";
+ ex_rtl_log_msg vvvv "Copying \`${_src}' into \`${_dst}' w/ -pPR.";
exp_rtl_fileop_check "${PREFIX}" "${*}";
cp -pPR -- "${@}";
fi; ;;
@@ -46,13 +46,13 @@ ex_rtl_fileop() {
if ex_rtl_fileop test "${2}"; then
ex_rtl_fileop rm "${2}";
fi;
- ex_rtl_log_msg vvvo "Linking \`${1}' to \`${2}' w/ -fs";
+ ex_rtl_log_msg vvvv "Linking \`${1}' to \`${2}' w/ -fs";
ln -fs -- "${1}" "${2}";
fi; ;;
mv) if [ \( -z "${1}" \) -o \( -z "${2}" \) ]; then
ex_rtl_log_msg failexit "Missing parameters (in: mv ${*}.)";
else
- ex_rtl_log_msg vvvo "Moving \`${1}' to \`${2}' w/ -fs";
+ ex_rtl_log_msg vvvv "Moving \`${1}' to \`${2}' w/ -fs";
exp_rtl_fileop_check "${PREFIX}" "${1}" "${2}";
mv -f -- "${1}" "${2}";
fi; ;;
@@ -66,31 +66,31 @@ ex_rtl_fileop() {
if ex_rtl_fileop test "${1}"; then
ex_rtl_fileop rm "${1}";
fi;
- ex_rtl_log_msg vvvo "Making directory \`${1}'.";
+ ex_rtl_log_msg vvvv "Making directory \`${1}'.";
mkdir -p -- "${1}";
elif [ "${_op}" = mkfifo ]; then
exp_rtl_fileop_check "${PREFIX}" "${1}";
if ex_rtl_fileop test "${1}"; then
ex_rtl_fileop rm "${1}";
fi;
- ex_rtl_log_msg vvvo "Creating FIFO \`${1}'.";
+ ex_rtl_log_msg vvvv "Creating FIFO \`${1}'.";
exp_rtl_fileop_check "${PREFIX}" "${1}";
mkfifo -- "${1}";
elif [ "${_op}" = rm ]\
&& ex_rtl_fileop test "${1}"; then
- ex_rtl_log_msg vvvo "Removing directory or file \`${1}'.";
+ ex_rtl_log_msg vvvv "Removing directory or file \`${1}'.";
exp_rtl_fileop_check "${PREFIX}" "${1}";
rm -rf -- "${1}";
elif [ "${_op}" = source_opt ]\
&& ex_rtl_fileop test "${1}"; then
- ex_rtl_log_msg vvvo "Sourcing file \`${1}'.";
+ ex_rtl_log_msg vvvv "Sourcing file \`${1}'.";
exp_rtl_fileop_check "${PREFIX}" "${1}";
. "${1}";
elif [ "${_op}" = test ]\
&& ! [ \( -L "${1}" \) -o \( -e "${1}" \) ]; then
return 1;
elif [ "${_op}" = touch ]; then
- ex_rtl_log_msg vvvo "Touching file \`${1}'.";
+ ex_rtl_log_msg vvvv "Touching file \`${1}'.";
exp_rtl_fileop_check "${PREFIX}" "${1}";
touch -- "${1}";
fi; shift;
diff --git a/subr/ex_rtl_log.subr b/subr/ex_rtl_log.subr
index e7d9ef3d..2ed295b6 100644
--- a/subr/ex_rtl_log.subr
+++ b/subr/ex_rtl_log.subr
@@ -44,6 +44,9 @@ ex_rtl_log_msg() {
elif [ "${_lvl}" = vvvo ]\
&& [ "${EXP_RTL_LOG_VNFO_LVL:-0}" -lt 3 ]; then
return;
+ elif [ "${_lvl}" = vvvv ]\
+ && [ "${EXP_RTL_LOG_VNFO_LVL:-0}" -lt 4 ]; then
+ return;
fi;
_lvl_uc="$(ex_rtl_toupper "${_lvl%exit}")";
_attr="$(ex_rtl_get_var_unsafe "DEFAULT_LOG_MSG_${_lvl_uc}_COLOUR")";