bin/dif: add sqlite
This commit is contained in:
parent
45296e6cd4
commit
64936470f2
|
@ -1,8 +1,14 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
# interactive diff with pagination and nice coloring
|
# interactive diff with pagination and nice coloring
|
||||||
# TODO diff sqlite repos with sqldiff
|
# TODO diff sqlite repos with sqldiff
|
||||||
if file --brief --mime "$1" "$2" | grep --quiet audio
|
mime="$(file --brief --mime "$1" "$2")"
|
||||||
then ff() { ffprobe -loglevel warning -print_format default=noprint_wrappers=1 -show_format -pretty "$@"; }
|
case "$mime" in
|
||||||
$(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")
|
(*audio*)
|
||||||
else wiked-diff "$@" # diff-color --report-identical-files "$@"
|
ff() { ffprobe -loglevel warning -print_format default=noprint_wrappers=1 -show_format -pretty "$@"; }
|
||||||
fi | less --RAW-CONTROL-CHARS --quit-on-intr --quit-if-one-screen
|
$(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")
|
||||||
|
;;
|
||||||
|
(*sqlite*) sqldiff "$@" ;;
|
||||||
|
(*) wiked-diff "$@" ;;
|
||||||
|
# diff-color --report-identical-files "$@";;
|
||||||
|
esac | less --RAW-CONTROL-CHARS --quit-on-intr --quit-if-one-screen
|
||||||
|
|
Loading…
Reference in New Issue