[pacman-dev] [PATCH 08/11] pacscripts: streamline usage function
Gordian Edenhofer
gordian.edenhofer at gmail.com
Thu Sep 29 10:23:08 UTC 2016
Signed-off-by: Gordian Edenhofer <gordian.edenhofer at gmail.com>
---
contrib/pacscripts.sh.in | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/contrib/pacscripts.sh.in b/contrib/pacscripts.sh.in
index 4a1e0c5..de94843 100644
--- a/contrib/pacscripts.sh.in
+++ b/contrib/pacscripts.sh.in
@@ -45,18 +45,20 @@ error() {
}
usage() {
- echo "${myname} (pacman) v${myver}"
+ printf "%s (pacman) %s\n" "$myname" "$myver"
echo
- echo "Prints the {pre,post}_{install,remove,upgrade} scripts of a given package."
+ printf -- "$(gettext "Prints the {pre,post}_{install,remove,upgrade} scripts of a given package")\n"
echo
- echo "Usage: ${myname} <pkgname|pkgfile>"
+ printf -- "$(gettext "Usage: %s <pkgname|pkgfile>")\n" "$0"
echo
- echo " Options:"
- echo " -h, --help Print this help message"
- echo " -v, --version Print program name and version"
+ printf -- "$(gettext "Options:")\n"
+ printf -- "$(gettext " -h, --help Print this help message")\n"
+ printf -- "$(gettext " -v, --version Print program name and version")\n"
+ echo
+ printf -- "$(gettext "Examples:")"
+ printf -- " %s gconf-editor\n" "$myname"
+ printf -- " %s gconf-editor-3.0.1-3-x86_64.pkg.tar.xz\n" "$myname"
echo
- echo "Example: ${myname} gconf-editor"
- echo "Example: ${myname} gconf-editor-3.0.1-3-x86_64.pkg.tar.xz"
}
version() {
--
2.10.0
More information about the pacman-dev
mailing list