diff options
Diffstat (limited to 'archival')
-rw-r--r-- | archival/ar.c | 11 | ||||
-rw-r--r-- | archival/bbunzip.c | 76 | ||||
-rw-r--r-- | archival/bzip2.c | 10 | ||||
-rw-r--r-- | archival/dpkg.c | 28 | ||||
-rw-r--r-- | archival/dpkg_deb.c | 15 | ||||
-rw-r--r-- | archival/gzip.c | 16 | ||||
-rw-r--r-- | archival/lzop.c | 27 | ||||
-rw-r--r-- | archival/rpm.c | 13 | ||||
-rw-r--r-- | archival/rpm2cpio.c | 6 | ||||
-rw-r--r-- | archival/unzip.c | 13 |
10 files changed, 215 insertions, 0 deletions
diff --git a/archival/ar.c b/archival/ar.c index a2e3306ac..f5a379fb8 100644 --- a/archival/ar.c +++ b/archival/ar.c | |||
@@ -17,6 +17,17 @@ | |||
17 | * http://www.unix-systems.org/single_unix_specification_v2/xcu/ar.html | 17 | * http://www.unix-systems.org/single_unix_specification_v2/xcu/ar.html |
18 | */ | 18 | */ |
19 | 19 | ||
20 | //usage:#define ar_trivial_usage | ||
21 | //usage: "[-o] [-v] [-p] [-t] [-x] ARCHIVE FILES" | ||
22 | //usage:#define ar_full_usage "\n\n" | ||
23 | //usage: "Extract or list FILES from an ar archive\n" | ||
24 | //usage: "\nOptions:" | ||
25 | //usage: "\n -o Preserve original dates" | ||
26 | //usage: "\n -p Extract to stdout" | ||
27 | //usage: "\n -t List" | ||
28 | //usage: "\n -x Extract" | ||
29 | //usage: "\n -v Verbose" | ||
30 | |||
20 | #include "libbb.h" | 31 | #include "libbb.h" |
21 | #include "archive.h" | 32 | #include "archive.h" |
22 | #include "ar.h" | 33 | #include "ar.h" |
diff --git a/archival/bbunzip.c b/archival/bbunzip.c index c4cc5d821..734c9b269 100644 --- a/archival/bbunzip.c +++ b/archival/bbunzip.c | |||
@@ -167,6 +167,15 @@ char* FAST_FUNC make_new_name_generic(char *filename, const char *expected_ext) | |||
167 | * | 167 | * |
168 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 168 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
169 | */ | 169 | */ |
170 | |||
171 | //usage:#define uncompress_trivial_usage | ||
172 | //usage: "[-cf] [FILE]..." | ||
173 | //usage:#define uncompress_full_usage "\n\n" | ||
174 | //usage: "Decompress .Z file[s]\n" | ||
175 | //usage: "\nOptions:" | ||
176 | //usage: "\n -c Write to stdout" | ||
177 | //usage: "\n -f Overwrite" | ||
178 | |||
170 | #if ENABLE_UNCOMPRESS | 179 | #if ENABLE_UNCOMPRESS |
171 | static | 180 | static |
172 | IF_DESKTOP(long long) int FAST_FUNC unpack_uncompress(unpack_info_t *info UNUSED_PARAM) | 181 | IF_DESKTOP(long long) int FAST_FUNC unpack_uncompress(unpack_info_t *info UNUSED_PARAM) |
@@ -218,6 +227,28 @@ int uncompress_main(int argc UNUSED_PARAM, char **argv) | |||
218 | * See the license_msg below and the file COPYING for the software license. | 227 | * See the license_msg below and the file COPYING for the software license. |
219 | * See the file algorithm.doc for the compression algorithms and file formats. | 228 | * See the file algorithm.doc for the compression algorithms and file formats. |
220 | */ | 229 | */ |
230 | |||
231 | //usage:#define gunzip_trivial_usage | ||
232 | //usage: "[-cft] [FILE]..." | ||
233 | //usage:#define gunzip_full_usage "\n\n" | ||
234 | //usage: "Decompress FILEs (or stdin)\n" | ||
235 | //usage: "\nOptions:" | ||
236 | //usage: "\n -c Write to stdout" | ||
237 | //usage: "\n -f Force" | ||
238 | //usage: "\n -t Test file integrity" | ||
239 | //usage: | ||
240 | //usage:#define gunzip_example_usage | ||
241 | //usage: "$ ls -la /tmp/BusyBox*\n" | ||
242 | //usage: "-rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz\n" | ||
243 | //usage: "$ gunzip /tmp/BusyBox-0.43.tar.gz\n" | ||
244 | //usage: "$ ls -la /tmp/BusyBox*\n" | ||
245 | //usage: "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar\n" | ||
246 | //usage: | ||
247 | //usage:#define zcat_trivial_usage | ||
248 | //usage: "FILE" | ||
249 | //usage:#define zcat_full_usage "\n\n" | ||
250 | //usage: "Decompress to stdout" | ||
251 | |||
221 | #if ENABLE_GUNZIP | 252 | #if ENABLE_GUNZIP |
222 | static | 253 | static |
223 | char* FAST_FUNC make_new_name_gunzip(char *filename, const char *expected_ext UNUSED_PARAM) | 254 | char* FAST_FUNC make_new_name_gunzip(char *filename, const char *expected_ext UNUSED_PARAM) |
@@ -344,6 +375,51 @@ int bunzip2_main(int argc UNUSED_PARAM, char **argv) | |||
344 | * | 375 | * |
345 | * Licensed under GPLv2, see file LICENSE in this source tree. | 376 | * Licensed under GPLv2, see file LICENSE in this source tree. |
346 | */ | 377 | */ |
378 | |||
379 | //usage:#define unlzma_trivial_usage | ||
380 | //usage: "[-cf] [FILE]..." | ||
381 | //usage:#define unlzma_full_usage "\n\n" | ||
382 | //usage: "Decompress FILE (or stdin)\n" | ||
383 | //usage: "\nOptions:" | ||
384 | //usage: "\n -c Write to stdout" | ||
385 | //usage: "\n -f Force" | ||
386 | //usage: | ||
387 | //usage:#define lzma_trivial_usage | ||
388 | //usage: "-d [-cf] [FILE]..." | ||
389 | //usage:#define lzma_full_usage "\n\n" | ||
390 | //usage: "Decompress FILE (or stdin)\n" | ||
391 | //usage: "\nOptions:" | ||
392 | //usage: "\n -d Decompress" | ||
393 | //usage: "\n -c Write to stdout" | ||
394 | //usage: "\n -f Force" | ||
395 | //usage: | ||
396 | //usage:#define lzcat_trivial_usage | ||
397 | //usage: "FILE" | ||
398 | //usage:#define lzcat_full_usage "\n\n" | ||
399 | //usage: "Decompress to stdout" | ||
400 | //usage: | ||
401 | //usage:#define unxz_trivial_usage | ||
402 | //usage: "[-cf] [FILE]..." | ||
403 | //usage:#define unxz_full_usage "\n\n" | ||
404 | //usage: "Decompress FILE (or stdin)\n" | ||
405 | //usage: "\nOptions:" | ||
406 | //usage: "\n -c Write to stdout" | ||
407 | //usage: "\n -f Force" | ||
408 | //usage: | ||
409 | //usage:#define xz_trivial_usage | ||
410 | //usage: "-d [-cf] [FILE]..." | ||
411 | //usage:#define xz_full_usage "\n\n" | ||
412 | //usage: "Decompress FILE (or stdin)\n" | ||
413 | //usage: "\nOptions:" | ||
414 | //usage: "\n -d Decompress" | ||
415 | //usage: "\n -c Write to stdout" | ||
416 | //usage: "\n -f Force" | ||
417 | //usage: | ||
418 | //usage:#define xzcat_trivial_usage | ||
419 | //usage: "FILE" | ||
420 | //usage:#define xzcat_full_usage "\n\n" | ||
421 | //usage: "Decompress to stdout" | ||
422 | |||
347 | #if ENABLE_UNLZMA | 423 | #if ENABLE_UNLZMA |
348 | static | 424 | static |
349 | IF_DESKTOP(long long) int FAST_FUNC unpack_unlzma(unpack_info_t *info UNUSED_PARAM) | 425 | IF_DESKTOP(long long) int FAST_FUNC unpack_unlzma(unpack_info_t *info UNUSED_PARAM) |
diff --git a/archival/bzip2.c b/archival/bzip2.c index ab08ffc1a..cfaf5fe20 100644 --- a/archival/bzip2.c +++ b/archival/bzip2.c | |||
@@ -7,6 +7,16 @@ | |||
7 | * about bzip2 library code. | 7 | * about bzip2 library code. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | //usage:#define bzip2_trivial_usage | ||
11 | //usage: "[OPTIONS] [FILE]..." | ||
12 | //usage:#define bzip2_full_usage "\n\n" | ||
13 | //usage: "Compress FILEs (or stdin) with bzip2 algorithm\n" | ||
14 | //usage: "\nOptions:" | ||
15 | //usage: "\n -1..9 Compression level" | ||
16 | //usage: "\n -d Decompress" | ||
17 | //usage: "\n -c Write to stdout" | ||
18 | //usage: "\n -f Force" | ||
19 | |||
10 | #include "libbb.h" | 20 | #include "libbb.h" |
11 | #include "archive.h" | 21 | #include "archive.h" |
12 | 22 | ||
diff --git a/archival/dpkg.c b/archival/dpkg.c index c37ae3349..f8e349d09 100644 --- a/archival/dpkg.c +++ b/archival/dpkg.c | |||
@@ -28,6 +28,34 @@ | |||
28 | * | 28 | * |
29 | */ | 29 | */ |
30 | 30 | ||
31 | //usage:#define dpkg_trivial_usage | ||
32 | //usage: "[-ilCPru] [-F OPT] PACKAGE" | ||
33 | //usage:#define dpkg_full_usage "\n\n" | ||
34 | //usage: "Install, remove and manage Debian packages\n" | ||
35 | //usage: "\nOptions:" | ||
36 | //usage: IF_LONG_OPTS( | ||
37 | //usage: "\n -i,--install Install the package" | ||
38 | //usage: "\n -l,--list List of installed packages" | ||
39 | //usage: "\n --configure Configure an unpackaged package" | ||
40 | //usage: "\n -P,--purge Purge all files of a package" | ||
41 | //usage: "\n -r,--remove Remove all but the configuration files for a package" | ||
42 | //usage: "\n --unpack Unpack a package, but don't configure it" | ||
43 | //usage: "\n --force-depends Ignore dependency problems" | ||
44 | //usage: "\n --force-confnew Overwrite existing config files when installing" | ||
45 | //usage: "\n --force-confold Keep old config files when installing" | ||
46 | //usage: ) | ||
47 | //usage: IF_NOT_LONG_OPTS( | ||
48 | //usage: "\n -i Install the package" | ||
49 | //usage: "\n -l List of installed packages" | ||
50 | //usage: "\n -C Configure an unpackaged package" | ||
51 | //usage: "\n -P Purge all files of a package" | ||
52 | //usage: "\n -r Remove all but the configuration files for a package" | ||
53 | //usage: "\n -u Unpack a package, but don't configure it" | ||
54 | //usage: "\n -F depends Ignore dependency problems" | ||
55 | //usage: "\n -F confnew Overwrite existing config files when installing" | ||
56 | //usage: "\n -F confold Keep old config files when installing" | ||
57 | //usage: ) | ||
58 | |||
31 | #include "libbb.h" | 59 | #include "libbb.h" |
32 | #include <fnmatch.h> | 60 | #include <fnmatch.h> |
33 | #include "archive.h" | 61 | #include "archive.h" |
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c index aee7b4cf5..9e1e811ee 100644 --- a/archival/dpkg_deb.c +++ b/archival/dpkg_deb.c | |||
@@ -4,6 +4,21 @@ | |||
4 | * | 4 | * |
5 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 5 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
6 | */ | 6 | */ |
7 | |||
8 | //usage:#define dpkg_deb_trivial_usage | ||
9 | //usage: "[-cefxX] FILE [argument" | ||
10 | //usage:#define dpkg_deb_full_usage "\n\n" | ||
11 | //usage: "Perform actions on Debian packages (.debs)\n" | ||
12 | //usage: "\nOptions:" | ||
13 | //usage: "\n -c List contents of filesystem tree" | ||
14 | //usage: "\n -e Extract control files to [argument] directory" | ||
15 | //usage: "\n -f Display control field name starting with [argument]" | ||
16 | //usage: "\n -x Extract packages filesystem tree to directory" | ||
17 | //usage: "\n -X Verbose extract" | ||
18 | //usage: | ||
19 | //usage:#define dpkg_deb_example_usage | ||
20 | //usage: "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n" | ||
21 | |||
7 | #include "libbb.h" | 22 | #include "libbb.h" |
8 | #include "archive.h" | 23 | #include "archive.h" |
9 | 24 | ||
diff --git a/archival/gzip.c b/archival/gzip.c index 38c5ae7fd..7686e1adb 100644 --- a/archival/gzip.c +++ b/archival/gzip.c | |||
@@ -39,6 +39,22 @@ gzip: bogus: No such file or directory | |||
39 | aa: 85.1% -- replaced with aa.gz | 39 | aa: 85.1% -- replaced with aa.gz |
40 | */ | 40 | */ |
41 | 41 | ||
42 | //usage:#define gzip_trivial_usage | ||
43 | //usage: "[-cfd] [FILE]..." | ||
44 | //usage:#define gzip_full_usage "\n\n" | ||
45 | //usage: "Compress FILEs (or stdin)\n" | ||
46 | //usage: "\nOptions:" | ||
47 | //usage: "\n -d Decompress" | ||
48 | //usage: "\n -c Write to stdout" | ||
49 | //usage: "\n -f Force" | ||
50 | //usage: | ||
51 | //usage:#define gzip_example_usage | ||
52 | //usage: "$ ls -la /tmp/busybox*\n" | ||
53 | //usage: "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/busybox.tar\n" | ||
54 | //usage: "$ gzip /tmp/busybox.tar\n" | ||
55 | //usage: "$ ls -la /tmp/busybox*\n" | ||
56 | //usage: "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n" | ||
57 | |||
42 | #include "libbb.h" | 58 | #include "libbb.h" |
43 | #include "archive.h" | 59 | #include "archive.h" |
44 | 60 | ||
diff --git a/archival/lzop.c b/archival/lzop.c index 62455c313..f4419910f 100644 --- a/archival/lzop.c +++ b/archival/lzop.c | |||
@@ -25,6 +25,33 @@ | |||
25 | "Minimalized" for busybox by Alain Knaff | 25 | "Minimalized" for busybox by Alain Knaff |
26 | */ | 26 | */ |
27 | 27 | ||
28 | //usage:#define lzop_trivial_usage | ||
29 | //usage: "[-cfvd123456789CF] [FILE]..." | ||
30 | //usage:#define lzop_full_usage "\n\n" | ||
31 | //usage: "Options:" | ||
32 | //usage: "\n -1..9 Compression level" | ||
33 | //usage: "\n -d Decompress" | ||
34 | //usage: "\n -c Write to stdout" | ||
35 | //usage: "\n -f Force" | ||
36 | //usage: "\n -v Verbose" | ||
37 | //usage: "\n -F Don't store or verify checksum" | ||
38 | //usage: "\n -C Also write checksum of compressed block" | ||
39 | //usage: | ||
40 | //usage:#define lzopcat_trivial_usage | ||
41 | //usage: "[-vCF] [FILE]..." | ||
42 | //usage:#define lzopcat_full_usage "\n\n" | ||
43 | //usage: " -v Verbose" | ||
44 | //usage: "\n -F Don't store or verify checksum" | ||
45 | //usage: | ||
46 | //usage:#define unlzop_trivial_usage | ||
47 | //usage: "[-cfvCF] [FILE]..." | ||
48 | //usage:#define unlzop_full_usage "\n\n" | ||
49 | //usage: "Options:" | ||
50 | //usage: "\n -c Write to stdout" | ||
51 | //usage: "\n -f Force" | ||
52 | //usage: "\n -v Verbose" | ||
53 | //usage: "\n -F Don't store or verify checksum" | ||
54 | |||
28 | #include "libbb.h" | 55 | #include "libbb.h" |
29 | #include "archive.h" | 56 | #include "archive.h" |
30 | #include "liblzo_interface.h" | 57 | #include "liblzo_interface.h" |
diff --git a/archival/rpm.c b/archival/rpm.c index 380226f9b..98a45d9cc 100644 --- a/archival/rpm.c +++ b/archival/rpm.c | |||
@@ -7,6 +7,19 @@ | |||
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | //usage:#define rpm_trivial_usage | ||
11 | //usage: "-i PACKAGE.rpm; rpm -qp[ildc] PACKAGE.rpm" | ||
12 | //usage:#define rpm_full_usage "\n\n" | ||
13 | //usage: "Manipulate RPM packages\n" | ||
14 | //usage: "\nCommands:" | ||
15 | //usage: "\n -i Install package" | ||
16 | //usage: "\n -qp Query package" | ||
17 | //usage: "\nOptions:" | ||
18 | //usage: "\n -i Show information" | ||
19 | //usage: "\n -l List contents" | ||
20 | //usage: "\n -d List documents" | ||
21 | //usage: "\n -c List config files" | ||
22 | |||
10 | #include "libbb.h" | 23 | #include "libbb.h" |
11 | #include "archive.h" | 24 | #include "archive.h" |
12 | #include "rpm.h" | 25 | #include "rpm.h" |
diff --git a/archival/rpm2cpio.c b/archival/rpm2cpio.c index ce8cd2c2c..ff4a0d1b0 100644 --- a/archival/rpm2cpio.c +++ b/archival/rpm2cpio.c | |||
@@ -6,6 +6,12 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | |||
10 | //usage:#define rpm2cpio_trivial_usage | ||
11 | //usage: "package.rpm" | ||
12 | //usage:#define rpm2cpio_full_usage "\n\n" | ||
13 | //usage: "Output a cpio archive of the rpm file" | ||
14 | |||
9 | #include "libbb.h" | 15 | #include "libbb.h" |
10 | #include "archive.h" | 16 | #include "archive.h" |
11 | #include "rpm.h" | 17 | #include "rpm.h" |
diff --git a/archival/unzip.c b/archival/unzip.c index 5d62c08cb..52b0a6414 100644 --- a/archival/unzip.c +++ b/archival/unzip.c | |||
@@ -19,6 +19,19 @@ | |||
19 | * Zip64 + other methods | 19 | * Zip64 + other methods |
20 | */ | 20 | */ |
21 | 21 | ||
22 | //usage:#define unzip_trivial_usage | ||
23 | //usage: "[-opts[modifiers]] FILE[.zip] [LIST] [-x XLIST] [-d DIR]" | ||
24 | //usage:#define unzip_full_usage "\n\n" | ||
25 | //usage: "Extract files from ZIP archives\n" | ||
26 | //usage: "\nOptions:" | ||
27 | //usage: "\n -l List archive contents (with -q for short form)" | ||
28 | //usage: "\n -n Never overwrite files (default)" | ||
29 | //usage: "\n -o Overwrite" | ||
30 | //usage: "\n -p Send output to stdout" | ||
31 | //usage: "\n -q Quiet" | ||
32 | //usage: "\n -x XLST Exclude these files" | ||
33 | //usage: "\n -d DIR Extract files into DIR" | ||
34 | |||
22 | #include "libbb.h" | 35 | #include "libbb.h" |
23 | #include "archive.h" | 36 | #include "archive.h" |
24 | 37 | ||