Browse Source

Merge branch 'master' into develop

pull/1200/head
JackDandy 6 years ago
parent
commit
96b1be84bd
  1. 5
      CHANGES.md
  2. 12
      autoProcessTV/onTxComplete.sh

5
CHANGES.md

@ -22,6 +22,11 @@
### 0.18.21 (2019-04-26 09:35:00 UTC)
* Change torrent client post process script to be compatible with Dash (tested with Ubuntu 18.04 LTS)
### 0.18.20 (2019-04-23 23:10:00 UTC)
* Add NinjaCentral usenet provider

12
autoProcessTV/onTxComplete.sh

@ -147,7 +147,7 @@ install_dir="$(dirname $(realpath "$0"))"
log(){
local logfile="${install_dir}/onTxComplete.log"
local txt="$1"
[ "1" == "$testmode" ] || [ "" != "$2" ] && echo "$txt"
[ "1" = "$testmode" ] || [ "" != "$2" ] && echo "$txt"
local ts="$(date '+%Y/%m/%d %H:%M:%S')"
if [ -e "$logfile" ]; then
@ -172,8 +172,8 @@ else
# Process config file
cfgfile="$install_dir"/onTxComplete.cfg
eval $(sed -r '/[^=]+=[^=]+/!d;/^[ *;#]/d;s/\s*=\s*/=/g' "$cfgfile")
if [ "1" == "$testmode" ]; then
eval $(sed -r '/[^=]+=[^=]+/!d;/^[ *]/d;/[;#]/d;s/\s*=\s*/=/g;s/\r//g' "$cfgfile")
if [ "1" = "$testmode" ]; then
log "Config ... param1 = ${param1}"
log "Config ... param2 = ${param2}"
fi
@ -236,7 +236,7 @@ while [ -e "$syncfile" ]; do
num=$((1 + $num))
done
[ "1" == "$testmode" ] && log "Running in ***test mode*** - files will not be copied"
[ "1" = "$testmode" ] && log "Running in ***test mode*** - files will not be copied"
log "**** cmd = \"$(realpath "$0")\""
log " param1 = \"$sg_path\""
log " param2 = \"$sg_label\""
@ -274,7 +274,7 @@ case "$sg_label" in "$client_label"*)
dstdir="$sg_path$parent$child"
dstfile="$dstdir/$filename"
if [ "1" == "$testmode" ]; then
if [ "1" = "$testmode" ]; then
[ ! -d "$dstdir" ] && log "mkdir -p \"$dstdir\""
if [ ! -e "$dstfile" ]; then
@ -298,7 +298,7 @@ case "$sg_label" in "$client_label"*)
# Create a file to prevent SG premature post processing (ref: step (d)) ..
echo "Copying file \"$content_path\" to \"$sg_path/\"" > "$syncfile"
if [ "1" == "$testmode" ]; then
if [ "1" = "$testmode" ]; then
log "cp \"$content_path\" \"$sg_path/\""

Loading…
Cancel
Save