better diagnostic output

This commit is contained in:
yosh 2024-02-02 17:33:25 -05:00
parent 9fbbc2fbb6
commit 1253d60e45
1 changed files with 2 additions and 1 deletions

View File

@ -38,9 +38,10 @@ trap "cleanup" INT HUP QUIT TERM EXIT
checkupdate() { checkupdate() {
errecho "checking for updates from https://git.unix.dog/yosh/flacconv/src/branch/main/flacconv..." errecho "checking for updates from https://git.unix.dog/yosh/flacconv/src/branch/main/flacconv..."
errecho
tmpupdate=$(mktemp) tmpupdate=$(mktemp)
curl -s -o "$tmpupdate" 'https://git.unix.dog/yosh/flacconv/raw/branch/main/flacconv' || fail "curl request failed! retry probably" 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!" errecho "you are updated!"
else else
errecho "the latest commit differs from the current version. if you use git, please git pull the repo for the update" errecho "the latest commit differs from the current version. if you use git, please git pull the repo for the update"