Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Kohler <ataraxia937@gmail.com>2011-03-27 22:04:40 -0400
committerDan McGee <dan@archlinux.org>2011-03-27 21:13:52 -0500
commit86ff381ac20df4317c1068fc82d556e74219ea9b (patch)
tree97ec8236b97df935fc538df73a414ccbf0a226d1
parent4a3cd364d00b6889b24a16542618f1e2c14b86ac (diff)
Clean up repo-add usage message
This now includes -s and -v, tailors itself to the current command, and is formatted more like that of other pacman commands. Signed-off-by: Ray Kohler <ataraxia937@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--scripts/repo-add.sh.in43
1 files changed, 25 insertions, 18 deletions
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index 1c0347cc..cb545f30 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -63,32 +63,39 @@ error() {
# print usage instructions
usage() {
- printf "repo-add, repo-remove (pacman) %s\n\n" "$myver"
- printf "$(gettext "Usage: repo-add [-d] [-f] [-q] [-s] [-v] <path-to-db> <package|delta> ...\n")"
- printf "$(gettext "Usage: repo-remove [-q] <path-to-db> <packagename|delta> ...\n\n")"
- printf "$(gettext "\
+ cmd="$(basename $0)"
+ printf "%s (pacman) %s\n\n" "$cmd" "$myver"
+ if [[ $cmd == "repo-add" ]] ; then
+ printf "$(gettext "Usage: repo-add [-d] [-f] [-q] [-s] [-v] <path-to-db> <package|delta> ...\n")"
+ printf "$(gettext "\
repo-add will update a package database by reading a package file.\n\
Multiple packages to add can be specified on the command line.\n\n")"
- printf "$(gettext "\
+ printf "$(gettext "Options:\n")"
+ printf "$(gettext " -d, --delta generate and add delta for package update\n")"
+ printf "$(gettext " -f, --files update database's file list\n")"
+ elif [[ $cmd == "repo-remove" ]] ; then
+ printf "$(gettext "Usage: repo-remove [-q] [-s] [-v] <path-to-db> <packagename|delta> ...\n\n")"
+ printf "$(gettext "\
repo-remove will update a package database by removing the package name\n\
specified on the command line from the given repo database. Multiple\n\
packages to remove can be specified on the command line.\n\n")"
- printf "$(gettext "\
-Use the -q/--quiet flag to minimize output to basic messages, warnings,\n\
-and errors.\n\n")"
- printf "$(gettext "\
-Use the -d/--delta flag to automatically generate and add a delta file\n\
-between the old entry and the new one, if the old package file is found\n\
-next to the new one.\n\n")"
- printf "$(gettext "\
-Use the -f/--files flag to update a database including file entries.\n\n
-See repo-add(8) for more details and descriptions of the available options.\n\n")"
- echo "$(gettext "Example: repo-add /path/to/repo.db.tar.gz pacman-3.0.0.pkg.tar.gz")"
- echo "$(gettext "Example: repo-remove /path/to/repo.db.tar.gz kernel26")"
+ printf "$(gettext "Options:\n")"
+ fi
+ printf "$(gettext " -q, --quiet minimize output\n")"
+ printf "$(gettext " -s, --sign sign database with GnuPG after update\n")"
+ printf "$(gettext " -v, --verify verify database's signature before update\n")"
+ printf "$(gettext "\n\
+See %s(8) for more details and descriptions of the available options.\n\n")" $cmd
+ if [[ $cmd == "repo-add" ]] ; then
+ echo "$(gettext "Example: repo-add /path/to/repo.db.tar.gz pacman-3.0.0.pkg.tar.gz")"
+ elif [[ $cmd == "repo-remove" ]] ; then
+ echo "$(gettext "Example: repo-remove /path/to/repo.db.tar.gz kernel26")"
+ fi
}
version() {
- printf "repo-add, repo-remove (pacman) %s\n\n" "$myver"
+ cmd="$(basename $0)"
+ printf "%s (pacman) %s\n\n" "$cmd" "$myver"
printf "$(gettext "\
Copyright (C) 2006-2008 Aaron Griffin <aaron@archlinux.org>.\n\
Copyright (c) 2007-2008 Dan McGee <dan@archlinux.org>.\n\n\