diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-28 17:28:53 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-28 17:28:53 +0200 |
commit | 400c0d30f5c5800453fc6491b591370061862466 (patch) | |
tree | 689465afe8896db0639b85fbba5f013726c64ede /custom/uucp-mediaserver/scripts/queue | |
parent | 95387891110c9f68e14a4a3480d4e1defb92ef31 (diff) | |
download | nixos-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/queue')
-rwxr-xr-x | custom/uucp-mediaserver/scripts/queue | 8 |
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} | |||
4 | exec 1> >(logger -t "$logTag" -p news.notice) | 4 | exec 1> >(logger -t "$logTag" -p news.notice) |
5 | exec 2> >(logger -t "$logTag" -p news.error) | 5 | exec 2> >(logger -t "$logTag" -p news.error) |
6 | 6 | ||
7 | doDebug=false | 7 | doDebug=true |
8 | debug() { | 8 | debug() { |
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 | |||
70 | done | 70 | done |
71 | shift $((OPTIND-1)) | 71 | shift $((OPTIND-1)) |
72 | 72 | ||
73 | printf "force: %d, noCall: %s, prepend: %s\n" ${force} ${noCall} ${prepend} | debug | ||
74 | |||
73 | for f (${@}); do | 75 | for 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} ]] } |