bin/dif: fix incorrect audio detection

This commit is contained in:
xeruf 2022-07-06 11:14:31 +02:00
parent 75f0f0d332
commit 88538ffcdf
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/bash -e
# interactive diff with pagination and nice coloring # 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 "$@"; } 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") $(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 "$@" else diff-color --report-identical-files "$@"