From f0a251ffabf14206f2e88d97e6d55295c1179e0e Mon Sep 17 00:00:00 2001 From: David Rabkin Date: Fri, 5 Jan 2024 01:53:44 +0200 Subject: [PATCH] Adopt less logging on basic operations --- app/install | 8 ++++---- app/tru | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/install b/app/install index 6ac9dac..04d63fb 100755 --- a/app/install +++ b/app/install @@ -1,6 +1,6 @@ #!/bin/sh # vi:et lbr noet sw=2 ts=2 tw=79 wrap -# Copyright 2022-2023 David Rabkin +# Copyright 2022-2024 David Rabkin # Uses Unix shell framework shellbase: # https://github.com/rdavid/shellbase/ # The script uses local variables which are not POSIX but supported by most @@ -8,8 +8,8 @@ # https://stackoverflow.com/q/18597697 # shellcheck disable=SC3043,SC2034 # Uses local variables, appears unused. readonly \ - BASE_APP_VERSION=0.9.20231216 \ - BASE_MIN_VERSION=0.9.20230505 \ + BASE_APP_VERSION=0.9.20240105 \ + BASE_MIN_VERSION=0.9.20240104 \ DST=/usr/local/bin \ REL=0.9.20231212 \ TGT=/usr/local/bin/base.sh @@ -35,7 +35,7 @@ main() { new="shellbase $REL" \ old validate "$@" - if file_exists $TGT >/dev/null 2>&1; then + if file_exists $TGT; then old="$(sh $TGT --quiet --version 2>&1)" || die "$old" [ "$old" = "$new" ] && msg="$new is already installed in $DST. Continue anyway?" || diff --git a/app/tru b/app/tru index 996530d..4a205d3 100755 --- a/app/tru +++ b/app/tru @@ -1,6 +1,6 @@ #!/bin/sh # vi:et lbr noet sw=2 ts=2 tw=79 wrap -# Copyright 2020-2023 David Rabkin +# Copyright 2020-2024 David Rabkin # tru stands for Transmission Remote Updater. The script removes a torrent with # content and than adds it again. It is useful to automatically increase a # ratio. @@ -10,8 +10,8 @@ # shellcheck disable=SC3043 # Uses local variables. # shellcheck disable=SC1091,SC2034 # File not following, appears unused. readonly \ - BASE_APP_VERSION=0.9.20231216 \ - BASE_MIN_VERSION=0.9.20230312 + BASE_APP_VERSION=0.9.20240105 \ + BASE_MIN_VERSION=0.9.20240104 . base.sh # Looks for torrent ID by torrent name extracted from torrent file name. @@ -84,7 +84,7 @@ validation() { nc -z $prm >/dev/null 2>&1 || die "$prm" is not available. # Validates third parameter full torrent file name. - isreadable "$TOR" || die + isreadable "$TOR" || die Unable to read "$TOR". out="$(transmission-show "$TOR")" || die Unable to read "$TOR": "$out" NME="$(printf %s "$out" | grep Name: | head -1 | cut -c 7-)" readonly NME