blob: 80d1a79cde5b8bc7f1d723034f2c4b18d4205b25 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#!/usr/bin/env bash
# Usage:
# diff-epubs.sh path/to/old.epub path/to/new.epub
tmp_dir="$(mktemp -d --suffix=-diff-epubs)"
unzip "$1" -d "$tmp_dir/old"
unzip "$2" -d "$tmp_dir/new"
diff --strip-trailing-cr -r "$tmp_dir"/{old,new}
exit_status=$?
rm -rf "$tmp_dir"
exit $exit_status
|