summaryrefslogtreecommitdiff
path: root/custom/uucp-mediaserver/scripts
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2018-04-28 17:28:53 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2018-04-28 17:28:53 +0200
commit400c0d30f5c5800453fc6491b591370061862466 (patch)
tree689465afe8896db0639b85fbba5f013726c64ede /custom/uucp-mediaserver/scripts
parent95387891110c9f68e14a4a3480d4e1defb92ef31 (diff)
downloadnixos-400c0d30f5c5800453fc6491b591370061862466.tar
nixos-400c0d30f5c5800453fc6491b591370061862466.tar.gz
nixos-400c0d30f5c5800453fc6491b591370061862466.tar.bz2
nixos-400c0d30f5c5800453fc6491b591370061862466.tar.xz
nixos-400c0d30f5c5800453fc6491b591370061862466.zip
more debugging
Diffstat (limited to 'custom/uucp-mediaserver/scripts')
-rwxr-xr-xcustom/uucp-mediaserver/scripts/queue8
1 files changed, 6 insertions, 2 deletions
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}
4exec 1> >(logger -t "$logTag" -p news.notice) 4exec 1> >(logger -t "$logTag" -p news.notice)
5exec 2> >(logger -t "$logTag" -p news.error) 5exec 2> >(logger -t "$logTag" -p news.error)
6 6
7doDebug=false 7doDebug=true
8debug() { 8debug() {
9 if $doDebug; then 9 if $doDebug; then
10 logger -t "$logTag" -p news.debug 10 logger -t "$logTag" -p news.debug
@@ -70,6 +70,8 @@ while getopts "frp" OPT; do
70done 70done
71shift $((OPTIND-1)) 71shift $((OPTIND-1))
72 72
73printf "force: %d, noCall: %s, prepend: %s\n" ${force} ${noCall} ${prepend} | debug
74
73for f (${@}); do 75for f (${@}); do
74 f=$(readlink -f ${f}) 76 f=$(readlink -f ${f})
75 if grep -q ${f} @queueDir@/${suffix}.queue; then 77 if grep -q ${f} @queueDir@/${suffix}.queue; then
@@ -117,7 +119,9 @@ while true; do
117 printf "queuing ā€˜%sā€™ for %s\n" ${file:t} ${suffix} | debug 119 printf "queuing ā€˜%sā€™ for %s\n" ${file:t} ${suffix} | debug
118 function send() { 120 function send() {
119 typeset -a cmd 121 typeset -a cmd
120 cmd=(uux $(if ${noCall}; then echo "-r"; fi) -g z) 122 cmd=(uux)
123 $noCall && cmd+=("-r")
124 cmd+=(-g z)
121 125
122 compatibleName=${file} 126 compatibleName=${file}
123 function munge() { [[ $(mungefilename ${file}) != ${file} ]] } 127 function munge() { [[ $(mungefilename ${file}) != ${file} ]] }