From 400c0d30f5c5800453fc6491b591370061862466 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 28 Apr 2018 17:28:53 +0200 Subject: more debugging --- custom/uucp-mediaserver/scripts/queue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'custom') diff --git a/custom/uucp-mediaserver/scripts/queue b/custom/uucp-mediaserver/scripts/queue index 4789f90c..c4d3be1c 100755 --- a/custom/uucp-mediaserver/scripts/queue +++ b/custom/uucp-mediaserver/scripts/queue @@ -4,7 +4,7 @@ logTag=${0:t} exec 1> >(logger -t "$logTag" -p news.notice) exec 2> >(logger -t "$logTag" -p news.error) -doDebug=false +doDebug=true debug() { if $doDebug; then logger -t "$logTag" -p news.debug @@ -70,6 +70,8 @@ while getopts "frp" OPT; do done shift $((OPTIND-1)) +printf "force: %d, noCall: %s, prepend: %s\n" ${force} ${noCall} ${prepend} | debug + for f (${@}); do f=$(readlink -f ${f}) if grep -q ${f} @queueDir@/${suffix}.queue; then @@ -117,7 +119,9 @@ while true; do printf "queuing ā€˜%sā€™ for %s\n" ${file:t} ${suffix} | debug function send() { typeset -a cmd - cmd=(uux $(if ${noCall}; then echo "-r"; fi) -g z) + cmd=(uux) + $noCall && cmd+=("-r") + cmd+=(-g z) compatibleName=${file} function munge() { [[ $(mungefilename ${file}) != ${file} ]] } -- cgit v1.2.3