[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Info-mtools] [PATCH] Add support for lzip to lz/uz
From: |
Antonio Diaz Diaz |
Subject: |
[Info-mtools] [PATCH] Add support for lzip to lz/uz |
Date: |
Thu, 11 Mar 2010 16:55:39 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905 |
Hello,
Now that GNU tar has added direct support for lzip[1], it is perhaps
time to offer the same capabilities to other platforms through the lz/uz
commands.
[1] http://www.nongnu.org/lzip/lzip.html
The attached patch adds lzip support to lz/uz, fixes bzip2 support
(.tb2), and documents the changes in the man pages for lz and uz.
Best regards,
Antonio.
diff -urdN mtools-4.0.13/lz.1 mtools-4.0.13.new/lz.1
--- mtools-4.0.13/lz.1 2010-02-22 23:03:31.000000000 +0100
+++ mtools-4.0.13.new/lz.1 2010-03-11 16:34:10.000000000 +0100
@@ -12,19 +12,20 @@
.\"
.TH LZ 1 "Wed Feb 23 00:00:00 EET 2000" "" "Mtools Users Manual"
.SH NAME
-lz \- gunzips and shows a listing of a gzip'd tar'd archive
+lz \- shows a listing of a compressed tar archive
.SH SYNOPSIS
.\" The command line
.B lz
.I file
.SH DESCRIPTION
.B lz
-provides a listing of a gzip'd tar'd archive, that is a \fBtar\fR(1) archive
-compressed with the \fBgzip\fR(1) utility.
+provides a listing of a compressed tar archive, that is a \fBtar\fR(1)
+archive compressed with any of the \fBgzip\fR(1), \fBbzip2\fR(1), or
+\fBlzip\fR(1) utilities.
It is not strictly necessary on Debian GNU/Linux, because the GNU
\fBtar\fR(1) program provides the same capability with the command
-.B tar -tzf
+.B tar -taf
.I file
but this utility is provided in the mtools package for other platforms and
@@ -38,5 +39,7 @@
.SH "SEE ALSO"
.BR mtools (1),
.BR gzip (1),
+.BR bzip2 (1),
+.BR lzip (1),
.BR tar (1),
.BR uz (1).
diff -urdN mtools-4.0.13/scripts/uz mtools-4.0.13.new/scripts/uz
--- mtools-4.0.13/scripts/uz 2009-03-01 00:21:41.000000000 +0100
+++ mtools-4.0.13.new/scripts/uz 2010-03-11 16:02:39.000000000 +0100
@@ -27,6 +27,7 @@
# 1994/02/19 DCN Created (as a trivial, but useful script)
# 1994/12/01 DCN Combined uz and lz, added suffix handling
# 2002/09/11 DCN Added bzip2 support
+# 2010/03/11 ADD Added lzip support
#
# Copyright (C) 1994, 2002 David C. Niemi (niemi at tuxers dot net)
# The author requires that any copies or derived works include this
@@ -64,7 +65,7 @@
echo >&2
found=
- for suffix in "" .gz .tgz .tar.gz .z .tar.z .taz .tpz .Z .tar.Z
.tar.bz2; do
+ for suffix in "" .gz .tgz .tar.gz .z .tar.z .taz .tpz .Z .tar.Z
.tar.bz2 .tb2 .lz .tlz ; do
if [ -r "${1}$suffix" ]; then
found=$1$suffix
break
@@ -75,6 +76,9 @@
*.tar.bz2 | *.tb2)
uzcmd='bzip2 -cd'
;;
+ *.lz | *.tlz)
+ uzcmd='lzip -cd'
+ ;;
esac
if [ -z "$found" ]; then
echo "$0: could not read \"$1\"." >&2
diff -urdN mtools-4.0.13/uz.1 mtools-4.0.13.new/uz.1
--- mtools-4.0.13/uz.1 2010-02-22 23:03:31.000000000 +0100
+++ mtools-4.0.13.new/uz.1 2010-03-11 16:34:10.000000000 +0100
@@ -12,19 +12,20 @@
.\"
.TH UZ 1 "Wed Feb 23 00:00:00 EET 2000" "" "Mtools Users Manual"
.SH NAME
-uz \- gunzips and extracts a gzip'd tar'd archive
+uz \- extracts a compressed tar archive
.SH SYNOPSIS
.\" The command line
.B uz
.I file
.SH DESCRIPTION
.B uz
-extracts a gzip'd tar'd archive, that is a \fBtar\fR(1) archive
-compressed with the \fBgzip\fR(1) utility.
+extracts a compressed tar archive, that is a \fBtar\fR(1) archive
+compressed with any of the \fBgzip\fR(1), \fBbzip2\fR(1), or
+\fBlzip\fR(1) utilities.
It is not strictly necessary on Debian GNU/Linux, because the GNU
\fBtar\fR(1) program provides the same capability with the command
-.B tar -xzf
+.B tar -xaf
.I file
but this utility is provided in the mtools package for other platforms and
@@ -35,9 +36,10 @@
.I Debian/GNU
mtools package.
-
.SH "SEE ALSO"
.BR mtools (1),
.BR gzip (1),
+.BR bzip2 (1),
+.BR lzip (1),
.BR tar (1),
.BR lz (1).
- [Info-mtools] [PATCH] Add support for lzip to lz/uz,
Antonio Diaz Diaz <=