From: Alex Pooley (@zuedev) Date: Mon, 23 Mar 2026 10:48:01 +0000 (+0000) Subject: use cmp for file comparison instead of git diff X-Git-Url: http://git.zue.dev/?a=commitdiff_plain;h=0634590c87d7cf548ec87278b0be987abe142664;p=git.zue.dev use cmp for file comparison instead of git diff --- diff --git a/cron/minutely.sh b/cron/minutely.sh index a0bd8db..ec67f72 100644 --- a/cron/minutely.sh +++ b/cron/minutely.sh @@ -19,7 +19,7 @@ cd "$GIT_ZUE_DEV" || { echo "Failed to change directory to $GIT_ZUE_DEV. PANIC!" git show HEAD:"$DOCKER_COMPOSE_FILENAME" > /dev/null 2>&1 || { echo "Failed to find $DOCKER_COMPOSE_FILENAME in the repository. PANIC!"; exit 1; } # compare our local copy of the docker-compose.yaml with the one in the repo -if ! git diff --quiet HEAD:"$DOCKER_COMPOSE_FILENAME" "$DOCKER_COMPOSE_DIRECTORY/$DOCKER_COMPOSE_FILENAME"; then +if ! cmp -s "$DOCKER_COMPOSE_DIRECTORY/$DOCKER_COMPOSE_FILENAME" <(git show HEAD:"$DOCKER_COMPOSE_FILENAME"); then echo "$DOCKER_COMPOSE_FILENAME has changed. Updating local copy..." git show HEAD:"$DOCKER_COMPOSE_FILENAME" > "$DOCKER_COMPOSE_DIRECTORY/$DOCKER_COMPOSE_FILENAME"