summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorPere Orga2011-03-27 22:40:30 +0200
committerDenys Vlasenko2011-03-27 22:40:30 +0200
commit1f4447b2d439e6f11d95746bb5f611c353305859 (patch)
tree0f47681009046a12ee050b989b838c68493a6a2e /archival
parent700fbc308dd1f2e063180786cddfcc4abd6c10c0 (diff)
downloadbusybox-1f4447b2d439e6f11d95746bb5f611c353305859.zip
busybox-1f4447b2d439e6f11d95746bb5f611c353305859.tar.gz
move help text from include/usage.src.h to archival/*.c
Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival')
-rw-r--r--archival/ar.c11
-rw-r--r--archival/bbunzip.c76
-rw-r--r--archival/bzip2.c10
-rw-r--r--archival/dpkg.c28
-rw-r--r--archival/dpkg_deb.c15
-rw-r--r--archival/gzip.c16
-rw-r--r--archival/lzop.c27
-rw-r--r--archival/rpm.c13
-rw-r--r--archival/rpm2cpio.c6
-rw-r--r--archival/unzip.c13
10 files changed, 215 insertions, 0 deletions
diff --git a/archival/ar.c b/archival/ar.c
index a2e3306..f5a379f 100644
--- a/archival/ar.c
+++ b/archival/ar.c
@@ -17,6 +17,17 @@
* http://www.unix-systems.org/single_unix_specification_v2/xcu/ar.html
*/
+//usage:#define ar_trivial_usage
+//usage: "[-o] [-v] [-p] [-t] [-x] ARCHIVE FILES"
+//usage:#define ar_full_usage "\n\n"
+//usage: "Extract or list FILES from an ar archive\n"
+//usage: "\nOptions:"
+//usage: "\n -o Preserve original dates"
+//usage: "\n -p Extract to stdout"
+//usage: "\n -t List"
+//usage: "\n -x Extract"
+//usage: "\n -v Verbose"
+
#include "libbb.h"
#include "archive.h"
#include "ar.h"
diff --git a/archival/bbunzip.c b/archival/bbunzip.c
index c4cc5d8..734c9b2 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)
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define uncompress_trivial_usage
+//usage: "[-cf] [FILE]..."
+//usage:#define uncompress_full_usage "\n\n"
+//usage: "Decompress .Z file[s]\n"
+//usage: "\nOptions:"
+//usage: "\n -c Write to stdout"
+//usage: "\n -f Overwrite"
+
#if ENABLE_UNCOMPRESS
static
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)
* See the license_msg below and the file COPYING for the software license.
* See the file algorithm.doc for the compression algorithms and file formats.
*/
+
+//usage:#define gunzip_trivial_usage
+//usage: "[-cft] [FILE]..."
+//usage:#define gunzip_full_usage "\n\n"
+//usage: "Decompress FILEs (or stdin)\n"
+//usage: "\nOptions:"
+//usage: "\n -c Write to stdout"
+//usage: "\n -f Force"
+//usage: "\n -t Test file integrity"
+//usage:
+//usage:#define gunzip_example_usage
+//usage: "$ ls -la /tmp/BusyBox*\n"
+//usage: "-rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz\n"
+//usage: "$ gunzip /tmp/BusyBox-0.43.tar.gz\n"
+//usage: "$ ls -la /tmp/BusyBox*\n"
+//usage: "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar\n"
+//usage:
+//usage:#define zcat_trivial_usage
+//usage: "FILE"
+//usage:#define zcat_full_usage "\n\n"
+//usage: "Decompress to stdout"
+
#if ENABLE_GUNZIP
static
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)
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+
+//usage:#define unlzma_trivial_usage
+//usage: "[-cf] [FILE]..."
+//usage:#define unlzma_full_usage "\n\n"
+//usage: "Decompress FILE (or stdin)\n"
+//usage: "\nOptions:"
+//usage: "\n -c Write to stdout"
+//usage: "\n -f Force"
+//usage:
+//usage:#define lzma_trivial_usage
+//usage: "-d [-cf] [FILE]..."
+//usage:#define lzma_full_usage "\n\n"
+//usage: "Decompress FILE (or stdin)\n"
+//usage: "\nOptions:"
+//usage: "\n -d Decompress"
+//usage: "\n -c Write to stdout"
+//usage: "\n -f Force"
+//usage:
+//usage:#define lzcat_trivial_usage
+//usage: "FILE"
+//usage:#define lzcat_full_usage "\n\n"
+//usage: "Decompress to stdout"
+//usage:
+//usage:#define unxz_trivial_usage
+//usage: "[-cf] [FILE]..."
+//usage:#define unxz_full_usage "\n\n"
+//usage: "Decompress FILE (or stdin)\n"
+//usage: "\nOptions:"
+//usage: "\n -c Write to stdout"
+//usage: "\n -f Force"
+//usage:
+//usage:#define xz_trivial_usage
+//usage: "-d [-cf] [FILE]..."
+//usage:#define xz_full_usage "\n\n"
+//usage: "Decompress FILE (or stdin)\n"
+//usage: "\nOptions:"
+//usage: "\n -d Decompress"
+//usage: "\n -c Write to stdout"
+//usage: "\n -f Force"
+//usage:
+//usage:#define xzcat_trivial_usage
+//usage: "FILE"
+//usage:#define xzcat_full_usage "\n\n"
+//usage: "Decompress to stdout"
+
#if ENABLE_UNLZMA
static
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 ab08ffc..cfaf5fe 100644
--- a/archival/bzip2.c
+++ b/archival/bzip2.c
@@ -7,6 +7,16 @@
* about bzip2 library code.
*/
+//usage:#define bzip2_trivial_usage
+//usage: "[OPTIONS] [FILE]..."
+//usage:#define bzip2_full_usage "\n\n"
+//usage: "Compress FILEs (or stdin) with bzip2 algorithm\n"
+//usage: "\nOptions:"
+//usage: "\n -1..9 Compression level"
+//usage: "\n -d Decompress"
+//usage: "\n -c Write to stdout"
+//usage: "\n -f Force"
+
#include "libbb.h"
#include "archive.h"
diff --git a/archival/dpkg.c b/archival/dpkg.c
index c37ae33..f8e349d 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -28,6 +28,34 @@
*
*/
+//usage:#define dpkg_trivial_usage
+//usage: "[-ilCPru] [-F OPT] PACKAGE"
+//usage:#define dpkg_full_usage "\n\n"
+//usage: "Install, remove and manage Debian packages\n"
+//usage: "\nOptions:"
+//usage: IF_LONG_OPTS(
+//usage: "\n -i,--install Install the package"
+//usage: "\n -l,--list List of installed packages"
+//usage: "\n --configure Configure an unpackaged package"
+//usage: "\n -P,--purge Purge all files of a package"
+//usage: "\n -r,--remove Remove all but the configuration files for a package"
+//usage: "\n --unpack Unpack a package, but don't configure it"
+//usage: "\n --force-depends Ignore dependency problems"
+//usage: "\n --force-confnew Overwrite existing config files when installing"
+//usage: "\n --force-confold Keep old config files when installing"
+//usage: )
+//usage: IF_NOT_LONG_OPTS(
+//usage: "\n -i Install the package"
+//usage: "\n -l List of installed packages"
+//usage: "\n -C Configure an unpackaged package"
+//usage: "\n -P Purge all files of a package"
+//usage: "\n -r Remove all but the configuration files for a package"
+//usage: "\n -u Unpack a package, but don't configure it"
+//usage: "\n -F depends Ignore dependency problems"
+//usage: "\n -F confnew Overwrite existing config files when installing"
+//usage: "\n -F confold Keep old config files when installing"
+//usage: )
+
#include "libbb.h"
#include <fnmatch.h>
#include "archive.h"
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c
index aee7b4c..9e1e811 100644
--- a/archival/dpkg_deb.c
+++ b/archival/dpkg_deb.c
@@ -4,6 +4,21 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define dpkg_deb_trivial_usage
+//usage: "[-cefxX] FILE [argument"
+//usage:#define dpkg_deb_full_usage "\n\n"
+//usage: "Perform actions on Debian packages (.debs)\n"
+//usage: "\nOptions:"
+//usage: "\n -c List contents of filesystem tree"
+//usage: "\n -e Extract control files to [argument] directory"
+//usage: "\n -f Display control field name starting with [argument]"
+//usage: "\n -x Extract packages filesystem tree to directory"
+//usage: "\n -X Verbose extract"
+//usage:
+//usage:#define dpkg_deb_example_usage
+//usage: "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n"
+
#include "libbb.h"
#include "archive.h"
diff --git a/archival/gzip.c b/archival/gzip.c
index 38c5ae7..7686e1a 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -39,6 +39,22 @@ gzip: bogus: No such file or directory
aa: 85.1% -- replaced with aa.gz
*/
+//usage:#define gzip_trivial_usage
+//usage: "[-cfd] [FILE]..."
+//usage:#define gzip_full_usage "\n\n"
+//usage: "Compress FILEs (or stdin)\n"
+//usage: "\nOptions:"
+//usage: "\n -d Decompress"
+//usage: "\n -c Write to stdout"
+//usage: "\n -f Force"
+//usage:
+//usage:#define gzip_example_usage
+//usage: "$ ls -la /tmp/busybox*\n"
+//usage: "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/busybox.tar\n"
+//usage: "$ gzip /tmp/busybox.tar\n"
+//usage: "$ ls -la /tmp/busybox*\n"
+//usage: "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
+
#include "libbb.h"
#include "archive.h"
diff --git a/archival/lzop.c b/archival/lzop.c
index 62455c3..f441991 100644
--- a/archival/lzop.c
+++ b/archival/lzop.c
@@ -25,6 +25,33 @@
"Minimalized" for busybox by Alain Knaff
*/
+//usage:#define lzop_trivial_usage
+//usage: "[-cfvd123456789CF] [FILE]..."
+//usage:#define lzop_full_usage "\n\n"
+//usage: "Options:"
+//usage: "\n -1..9 Compression level"
+//usage: "\n -d Decompress"
+//usage: "\n -c Write to stdout"
+//usage: "\n -f Force"
+//usage: "\n -v Verbose"
+//usage: "\n -F Don't store or verify checksum"
+//usage: "\n -C Also write checksum of compressed block"
+//usage:
+//usage:#define lzopcat_trivial_usage
+//usage: "[-vCF] [FILE]..."
+//usage:#define lzopcat_full_usage "\n\n"
+//usage: " -v Verbose"
+//usage: "\n -F Don't store or verify checksum"
+//usage:
+//usage:#define unlzop_trivial_usage
+//usage: "[-cfvCF] [FILE]..."
+//usage:#define unlzop_full_usage "\n\n"
+//usage: "Options:"
+//usage: "\n -c Write to stdout"
+//usage: "\n -f Force"
+//usage: "\n -v Verbose"
+//usage: "\n -F Don't store or verify checksum"
+
#include "libbb.h"
#include "archive.h"
#include "liblzo_interface.h"
diff --git a/archival/rpm.c b/archival/rpm.c
index 380226f..98a45d9 100644
--- a/archival/rpm.c
+++ b/archival/rpm.c
@@ -7,6 +7,19 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define rpm_trivial_usage
+//usage: "-i PACKAGE.rpm; rpm -qp[ildc] PACKAGE.rpm"
+//usage:#define rpm_full_usage "\n\n"
+//usage: "Manipulate RPM packages\n"
+//usage: "\nCommands:"
+//usage: "\n -i Install package"
+//usage: "\n -qp Query package"
+//usage: "\nOptions:"
+//usage: "\n -i Show information"
+//usage: "\n -l List contents"
+//usage: "\n -d List documents"
+//usage: "\n -c List config files"
+
#include "libbb.h"
#include "archive.h"
#include "rpm.h"
diff --git a/archival/rpm2cpio.c b/archival/rpm2cpio.c
index ce8cd2c..ff4a0d1 100644
--- a/archival/rpm2cpio.c
+++ b/archival/rpm2cpio.c
@@ -6,6 +6,12 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define rpm2cpio_trivial_usage
+//usage: "package.rpm"
+//usage:#define rpm2cpio_full_usage "\n\n"
+//usage: "Output a cpio archive of the rpm file"
+
#include "libbb.h"
#include "archive.h"
#include "rpm.h"
diff --git a/archival/unzip.c b/archival/unzip.c
index 5d62c08..52b0a64 100644
--- a/archival/unzip.c
+++ b/archival/unzip.c
@@ -19,6 +19,19 @@
* Zip64 + other methods
*/
+//usage:#define unzip_trivial_usage
+//usage: "[-opts[modifiers]] FILE[.zip] [LIST] [-x XLIST] [-d DIR]"
+//usage:#define unzip_full_usage "\n\n"
+//usage: "Extract files from ZIP archives\n"
+//usage: "\nOptions:"
+//usage: "\n -l List archive contents (with -q for short form)"
+//usage: "\n -n Never overwrite files (default)"
+//usage: "\n -o Overwrite"
+//usage: "\n -p Send output to stdout"
+//usage: "\n -q Quiet"
+//usage: "\n -x XLST Exclude these files"
+//usage: "\n -d DIR Extract files into DIR"
+
#include "libbb.h"
#include "archive.h"