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"