set -e
close_term () {
- printf '\n%s' '*** Close the terminal window or press Return.'; read OK
- test -z "$OK" && exit $1
+ sleep 3
+ exit $1
}
-f[0]=$(mktemp -t cdif.XXXXXX) || close_or_exit 1
-f[1]=$(mktemp -t cdif.XXXXXX) || close_or_exit 1
+f[0]=$(mktemp -t cdif.XXXXXX) || exit 1
+f[1]=$(mktemp -t cdif.XXXXXX) || exit 1
trap 'rm -f "${f[0]}" "${f[1]}"' EXIT
## Prepare the pages to be compared.
if test "${input%.html}" != "$input" -a "${input%-diff.html}" == "$input";
then
# - Standardize the format for easier reading of the diff.
- if test -f "$HOME/bin/reformat-html"; then
- $HOME/bin/reformat-html $input ${f[$n]}
+ if test -f "$HOME/bin/reformat-html.1"; then
+ $HOME/bin/reformat-html.1 $input ${f[$n]}
else
cp $input ${f[$n]}
fi