From 88538ffcdfc3dc082d87774d7d938e28e4cac5ac Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Wed, 6 Jul 2022 11:14:31 +0200 Subject: [PATCH] bin/dif: fix incorrect audio detection --- .local/bin/scripts/dif | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/scripts/dif b/.local/bin/scripts/dif index c7a296c..710e2b2 100755 --- a/.local/bin/scripts/dif +++ b/.local/bin/scripts/dif @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -e # interactive diff with pagination and nice coloring -if file --mime "$1" "$2" | grep --quiet audio +if file --brief --mime "$1" "$2" | grep --quiet audio then ff() { ffprobe -loglevel warning -print_format default=noprint_wrappers=1 -show_format -pretty "$@"; } $(test $(tput cols) -gt 120 && echo "diff --color=always --side-by-side" || echo "diff-color") --report-identical-files --label="$1" --label="$2" <(ff "$1") <(ff "$2") else diff-color --report-identical-files "$@"