tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Simple unzip(1) replacement
Hi all,
in src/usr.bin/unzip there is a simple libarchive frontend emulating
most of the infozip command line. Some of the major obscure features are
missing (-T, -z, -b, -s, -C, -K, -M, -V, -W, -X, -$, -/, -:, only
positive option forms). It should be good enough for pkgsrc and everyday
usage though.
The code is reasonable straight forward and only complicated by unzip(1)
having almost as much options as ls(1) already.
Comments on enabling it by default? Attached patch does that, the second
patch makes pkgsrc use it by default.
Joerg
Index: distrib/sets/lists/base/mi
===================================================================
RCS file: /home/joerg/repo/netbsd/src/distrib/sets/lists/base/mi,v
retrieving revision 1.823
diff -u -p -r1.823 mi
--- distrib/sets/lists/base/mi 18 Jul 2009 22:24:02 -0000 1.823
+++ distrib/sets/lists/base/mi 22 Aug 2009 01:11:19 -0000
@@ -977,6 +977,7 @@
./usr/bin/uniq base-util-bin
./usr/bin/units base-util-bin
./usr/bin/unvis base-util-bin
+./usr/bin/unzip base-util-bin
./usr/bin/uptime base-util-bin
./usr/bin/usbhidaction base-util-bin
./usr/bin/usbhidctl base-util-bin
Index: distrib/sets/lists/comp/mi
===================================================================
RCS file: /home/joerg/repo/netbsd/src/distrib/sets/lists/comp/mi,v
retrieving revision 1.1294
diff -u -p -r1.1294 mi
--- distrib/sets/lists/comp/mi 20 Aug 2009 22:07:49 -0000 1.1294
+++ distrib/sets/lists/comp/mi 22 Aug 2009 01:10:53 -0000
@@ -3111,6 +3111,7 @@
./usr/libdata/debug/usr/bin/units.debug comp-util-debug
debug
./usr/libdata/debug/usr/bin/unprotoize.debug comp-c-debug
gcccmds,debug
./usr/libdata/debug/usr/bin/unvis.debug comp-util-debug
debug
+./usr/libdata/debug/usr/bin/unzip.debug comp-util-debug
debug
./usr/libdata/debug/usr/bin/usbhidaction.debug comp-util-debug debug
./usr/libdata/debug/usr/bin/usbhidctl.debug comp-util-debug debug
./usr/libdata/debug/usr/bin/users.debug comp-util-debug
debug
Index: distrib/sets/lists/man/mi
===================================================================
RCS file: /home/joerg/repo/netbsd/src/distrib/sets/lists/man/mi,v
retrieving revision 1.1153
diff -u -p -r1.1153 mi
--- distrib/sets/lists/man/mi 14 Aug 2009 21:17:21 -0000 1.1153
+++ distrib/sets/lists/man/mi 22 Aug 2009 01:10:46 -0000
@@ -507,6 +507,7 @@
./usr/share/man/cat1/uniq.0 man-util-catman .cat
./usr/share/man/cat1/units.0 man-util-catman .cat
./usr/share/man/cat1/unvis.0 man-util-catman .cat
+./usr/share/man/cat1/unzip.0 man-util-catman .cat
./usr/share/man/cat1/uptime.0 man-util-catman .cat
./usr/share/man/cat1/usbhidaction.0 man-util-catman .cat
./usr/share/man/cat1/usbhidctl.0 man-util-catman .cat
@@ -3176,6 +3177,7 @@
./usr/share/man/html1/uniq.html man-util-htmlman
html
./usr/share/man/html1/units.html man-util-htmlman html
./usr/share/man/html1/unvis.html man-util-htmlman html
+./usr/share/man/html1/unzip.html man-util-htmlman html
./usr/share/man/html1/uptime.html man-util-htmlman html
./usr/share/man/html1/usbhidaction.html man-util-htmlman
html
./usr/share/man/html1/usbhidctl.html man-util-htmlman html
@@ -5507,6 +5509,7 @@
./usr/share/man/man1/uniq.1 man-util-man .man
./usr/share/man/man1/units.1 man-util-man .man
./usr/share/man/man1/unvis.1 man-util-man .man
+./usr/share/man/man1/unzip.1 man-util-man .man
./usr/share/man/man1/uptime.1 man-util-man .man
./usr/share/man/man1/usbhidaction.1 man-util-man .man
./usr/share/man/man1/usbhidctl.1 man-util-man .man
Index: usr.bin/Makefile
===================================================================
RCS file: /home/joerg/repo/netbsd/src/usr.bin/Makefile,v
retrieving revision 1.178
diff -u -p -r1.178 Makefile
--- usr.bin/Makefile 15 Aug 2009 16:21:04 -0000 1.178
+++ usr.bin/Makefile 22 Aug 2009 01:10:01 -0000
@@ -25,7 +25,7 @@ SUBDIR= apply apropos asa at audio awk \
showmount shuffle sockstat soelim sort spell split stat su systat \
tabs tail talk tcopy tee telnet tftp time tip tn3270 touch tput \
tr true tset tsort tty ul uname unexpand unifdef \
- uniq units unvis usbhidaction usbhidctl users utoppya \
+ uniq units unvis unzip usbhidaction usbhidctl users utoppya \
uudecode uuencode uuidgen vacation vgrind vis vmstat vndcompress w \
wall wc what whatis whereis who whois window \
write xargs xinstall xlint xstr yacc yes
Index: mk/tools/tools.NetBSD.mk
===================================================================
RCS file: /home/joerg/repo/netbsd/pkgsrc/mk/tools/tools.NetBSD.mk,v
retrieving revision 1.41
diff -u -p -r1.41 tools.NetBSD.mk
--- mk/tools/tools.NetBSD.mk 22 May 2008 20:11:55 -0000 1.41
+++ mk/tools/tools.NetBSD.mk 22 Aug 2009 01:20:06 -0000
@@ -113,6 +113,9 @@ TOOLS_PLATFORM.touch?= /usr/bin/touch
TOOLS_PLATFORM.tr?= /usr/bin/tr
TOOLS_PLATFORM.true?= true # shell builtin
TOOLS_PLATFORM.tsort?= /usr/bin/tsort
+.if exists(/usr/bin/unzip)
+TOOLS_PLATFORM.unzip?= /usr/bin/unzip
+.endif
TOOLS_PLATFORM.wc?= /usr/bin/wc
TOOLS_PLATFORM.xargs?= /usr/bin/xargs
.if exists(/usr/bin/xgettext)
Home |
Main Index |
Thread Index |
Old Index