From 1253d60e457088acc5ac88cbc8a6ab44e645dc0a Mon Sep 17 00:00:00 2001 From: yosh Date: Fri, 2 Feb 2024 17:33:25 -0500 Subject: [PATCH] better diagnostic output --- flacconv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flacconv b/flacconv index 792ecdd..3145c7d 100755 --- a/flacconv +++ b/flacconv @@ -38,9 +38,10 @@ trap "cleanup" INT HUP QUIT TERM EXIT checkupdate() { errecho "checking for updates from https://git.unix.dog/yosh/flacconv/src/branch/main/flacconv..." + errecho tmpupdate=$(mktemp) curl -s -o "$tmpupdate" 'https://git.unix.dog/yosh/flacconv/raw/branch/main/flacconv' || fail "curl request failed! retry probably" - if cmp "$tmpupdate" "$0"; then + if cmp -s "$tmpupdate" "$0"; then errecho "you are updated!" else errecho "the latest commit differs from the current version. if you use git, please git pull the repo for the update"