From 6aff45a10bfcbcec95e7306c6563a249303319db Mon Sep 17 00:00:00 2001 From: Dave Morriss Date: Fri, 23 Aug 2024 21:17:21 +0100 Subject: [PATCH] Minor updates InternetArchive/repair_assets: Accidentally reverset the "sanity check" logic, so put it back the right way! InternetArchive/view_derivatives: Started on the POD documentation but didn't get very far. --- InternetArchive/repair_assets | 13 +++++++------ InternetArchive/view_derivatives | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/InternetArchive/repair_assets b/InternetArchive/repair_assets index 644f7ca..912236c 100755 --- a/InternetArchive/repair_assets +++ b/InternetArchive/repair_assets @@ -17,7 +17,7 @@ # AUTHOR: Dave Morriss (djm), Dave.Morriss@gmail.com # VERSION: 0.0.8 # CREATED: 2024-05-10 21:26:31 -# REVISION: 2024-08-22 21:48:44 +# REVISION: 2024-08-23 11:55:25 # #=============================================================================== @@ -64,18 +64,19 @@ define_colours # # Sanity checks. Calling 'command' on a non-existent script/program will # return an empty string. This works for built-in stuff and things on the -# PATH. +# PATH. These are all 'true' tests with the stuff in braces being run if they +# are not true. # IA=$(command -v ia) -[ -z "$IA" ] || { echo "Program 'ia' was not found"; exit 1; } +[ -n "$IA" ] || { echo "Program 'ia' was not found"; exit 1; } Q2T=$(command -v query2tt2) -[ -z "$Q2T" ] || { echo "Program 'query2tt2' was not found"; exit 1; } +[ -n "$Q2T" ] || { echo "Program 'query2tt2' was not found"; exit 1; } FIXAL="$BASEDIR/fix_asset_links" [ -e "$FIXAL" ] || { echo "Program '$FIXAL' was not found"; exit 1; } TUNNEL_IS_OPEN=$(command -v tunnel_is_open) -[ -z "$TUNNEL_IS_OPEN" ] || { echo "Program 'tunnel_is_open' was not found"; exit 1; } +[ -n "$TUNNEL_IS_OPEN" ] || { echo "Program 'tunnel_is_open' was not found"; exit 1; } OPEN_TUNNEL=$(command -v open_tunnel) -[ -z "$OPEN_TUNNEL" ] || { echo "Program 'open_tunnel' was not found"; exit 1; } +[ -n "$OPEN_TUNNEL" ] || { echo "Program 'open_tunnel' was not found"; exit 1; } # # Make temporary files and set traps to delete them diff --git a/InternetArchive/view_derivatives b/InternetArchive/view_derivatives index 8d211aa..28ed5f6 100755 --- a/InternetArchive/view_derivatives +++ b/InternetArchive/view_derivatives @@ -377,13 +377,13 @@ __END__ =head1 NAME - - +view_derivatives - =head1 VERSION The initial template usually just has: -This documentation refers to version 0.0.2 +This documentation refers to view_derivatives version 0.0.2 =head1 USAGE