aboutsummaryrefslogtreecommitdiff
path: root/src/scripts/xzdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsrc/scripts/xzdiff (renamed from src/scripts/lzdiff)24
-rw-r--r--src/scripts/xzdiff.1 (renamed from src/scripts/lzdiff.1)29
2 files changed, 30 insertions, 23 deletions
diff --git a/src/scripts/lzdiff b/src/scripts/xzdiff
index c867cbea..50179bb9 100755
--- a/src/scripts/lzdiff
+++ b/src/scripts/xzdiff
@@ -1,10 +1,10 @@
#!/bin/sh
# sh is buggy on RS/6000 AIX 3.2. Replace above line with #!/bin/ksh
-# lzcmp and lzdiff are used to invoke the cmp or the diff pro-
+# xzcmp and xzdiff are used to invoke the cmp or the diff pro-
# gram on compressed files. All options specified are passed
# directly to cmp or diff. If only 1 file is specified, then
-# the files compared are file1 and an uncompressed file1.lzma.
+# the files compared are file1 and an uncompressed file1.xz.
# If two files are specified, then they are uncompressed and
# fed to cmp or diff. The exit status from cmp or diff is
# preserved.
@@ -35,29 +35,29 @@ if test -z "$FILES"; then
fi
set $FILES
if test $# -eq 1; then
- FILE=`echo "$1" | sed 's/[-.][tlaz]*$//'`
- lzma -dc "$1" | $comp $OPTIONS - "$FILE"
+ FILE=`echo "$1" | sed 's/[-.][almtxz]*$//'`
+ xz -dc "$1" | $comp $OPTIONS - "$FILE"
elif test $# -eq 2; then
case "$1" in
- *[-.]lzma | *.t[la]z)
+ *[-.]xz | *.txz | *[-.]lzma | *.tlz)
case "$2" in
- *[-.]lzma | *.t[la]z)
- F=`echo "$2" | sed 's|.*/||;s|[-.][tlaz]*||'`
+ *[-.]xz | *.txz | *[-.]lzma | *.tlz)
+ F=`echo "$2" | sed 's|.*/||;s|[-.][almtxz]*||'`
TF=`/usr/bin/mktemp ${TMPDIR:-/tmp}/"$F".XXXXXXXXXX` || exit 1
trap 'rm -f "$TF"; exit 2' EXIT HUP INT PIPE TERM
- lzma -dc "$2" > "$TF" || exit
- lzma -dc "$1" | $comp $OPTIONS - "$TF"
+ xz -dc -- "$2" > "$TF" || exit
+ xz -dc -- "$1" | $comp $OPTIONS - "$TF"
STAT="$?"
rm -f "$TF" || STAT=2
trap EXIT HUP INT PIPE TERM
exit $STAT;;
- *) lzma -dc "$1" | $comp $OPTIONS - "$2";;
+ *) xz -dc -- "$1" | $comp $OPTIONS - "$2";;
esac;;
*) case "$2" in
- *[-.]lzma | *.t[la]z)
- lzma -dc "$2" | $comp $OPTIONS "$1" -;;
+ *[-.]xz | *.txz | *[-.]lzma | *.tlz)
+ xz -dc -- "$2" | $comp $OPTIONS "$1" -;;
*) $comp $OPTIONS "$1" "$2";;
esac;;
esac
diff --git a/src/scripts/lzdiff.1 b/src/scripts/xzdiff.1
index 17bb855a..7d4f6060 100644
--- a/src/scripts/lzdiff.1
+++ b/src/scripts/xzdiff.1
@@ -1,16 +1,23 @@
-.TH LZDIFF 1 "24 Jun 2005" "LZMA utils"
+.\" Original file was take from gzip, thus this man page is under GNU GPLv2+.
+.TH XZDIFF 1 "2009-04-13" "XZ Utils"
.SH NAME
-lzcmp, lzdiff \- compare LZMA compressed files
+xzcmp, xzdiff, lzcmp, lzdiff \- compare .xz and .lzma compressed files
.SH SYNOPSIS
+.B xzcmp
+.RI [ cmp_options "] " file1 " [" file2 ]
+.br
+.B xzdiff
+.RI [ diff_options "] " file1 " [" file2 ]
+.br
.B lzcmp
.RI [ cmp_options "] " file1 " [" file2 ]
.br
-.B zdiff
+.B lzdiff
.RI [ diff_options "] " file1 " [" file2 ]
.SH DESCRIPTION
-.B lzcmp
+.B xzcmp
and
-.B zdiff
+.B xdiff
are used to invoke the
.BR cmp (1)
or the
@@ -21,8 +28,9 @@ or
.BR diff "."
If only 1 file is specified, then the files compared are
.I file1
-and an uncompressed
-.IB file1 ".gz\fR."
+(which must have .xz or .lzma suffix) and
+.I file1
+from which the .xz or .lzma suffix has been stripped.
If two files are specified, then they are uncompressed if necessary and fed to
.B cmp
or
@@ -39,10 +47,9 @@ shipped in gzip package.
.SH "SEE ALSO"
.BR cmp (1),
.BR diff (1),
-.BR lzmore(1),
-.BR lzgrep(1),
-.BR lzma (1),
-.BR lzmash (1)
+.BR xzmore(1),
+.BR xzgrep(1),
+.BR xz (1)
.SH BUGS
Messages from the
.B cmp