1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

repo-add: clean up help messages

Use consistent blank lines across all commands, get rid of the
translated double newlines which only serve to confuse translators, and
fix -h/--help for that extra special third command this script offers.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2012-01-12 09:32:19 -06:00
parent d9af1a0cf2
commit 430b0df779

View File

@ -48,30 +48,38 @@ usage() {
printf "%s (pacman) %s\n\n" "$cmd" "$myver" printf "%s (pacman) %s\n\n" "$cmd" "$myver"
if [[ $cmd == "repo-add" ]] ; then if [[ $cmd == "repo-add" ]] ; then
printf "$(gettext "Usage: repo-add [options] <path-to-db> <package|delta> ...\n")" printf "$(gettext "Usage: repo-add [options] <path-to-db> <package|delta> ...\n")"
printf "\n"
printf "$(gettext "\ printf "$(gettext "\
repo-add will update a package database by reading a package file.\n\ 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")" Multiple packages to add can be specified on the command line.\n")"
printf "\n"
printf "$(gettext "Options:\n")" printf "$(gettext "Options:\n")"
printf "$(gettext " -d, --delta generate and add delta for package update\n")" printf "$(gettext " -d, --delta generate and add delta for package update\n")"
printf "$(gettext " -f, --files update database's file list\n")" printf "$(gettext " -f, --files update database's file list\n")"
elif [[ $cmd == "repo-remove" ]] ; then elif [[ $cmd == "repo-remove" ]] ; then
printf "$(gettext "Usage: repo-remove [options] <path-to-db> <packagename|delta> ...\n\n")" printf "$(gettext "Usage: repo-remove [options] <path-to-db> <packagename|delta> ...\n")"
printf "\n"
printf "$(gettext "\ printf "$(gettext "\
repo-remove will update a package database by removing the package name\n\ 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\ specified on the command line from the given repo database. Multiple\n\
packages to remove can be specified on the command line.\n\n")" packages to remove can be specified on the command line.\n")"
printf "\n"
printf "$(gettext "Options:\n")" printf "$(gettext "Options:\n")"
else
printf "$(gettext "Please move along, there is nothing to see here.\n")"
return
fi fi
printf "$(gettext " -q, --quiet minimize output\n")" printf "$(gettext " -q, --quiet minimize output\n")"
printf "$(gettext " -s, --sign sign database with GnuPG after update\n")" printf "$(gettext " -s, --sign sign database with GnuPG after update\n")"
printf "$(gettext " -k, --key <key> use the specified key to sign the database\n")" printf "$(gettext " -k, --key <key> use the specified key to sign the database\n")"
printf "$(gettext " -v, --verify verify database's signature before update\n")" printf "$(gettext " -v, --verify verify database's signature before update\n")"
printf "$(gettext "\n\ printf "$(gettext "\n\
See %s(8) for more details and descriptions of the available options.\n\n")" $cmd See %s(8) for more details and descriptions of the available options.\n")" $cmd
printf "\n"
if [[ $cmd == "repo-add" ]] ; then if [[ $cmd == "repo-add" ]] ; then
echo "$(gettext "Example: repo-add /path/to/repo.db.tar.gz pacman-3.0.0-1-i686.pkg.tar.gz")" printf "$(gettext "Example: repo-add /path/to/repo.db.tar.gz pacman-3.0.0-1-i686.pkg.tar.gz\n")"
elif [[ $cmd == "repo-remove" ]] ; then elif [[ $cmd == "repo-remove" ]] ; then
echo "$(gettext "Example: repo-remove /path/to/repo.db.tar.gz kernel26")" printf "$(gettext "Example: repo-remove /path/to/repo.db.tar.gz kernel26\n")"
fi fi
} }