Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/pacman-db-upgrade.sh.in
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-01-23 17:14:25 -0500
committerDan McGee <dan@archlinux.org>2012-01-30 21:31:38 -0600
commit9e9835f4640a45cc758fa64de5923d7f836fe1f4 (patch)
treea105d263cda79f687fed3a91fb4bfec4267c1eb6 /scripts/pacman-db-upgrade.sh.in
parent7ff1b945f6c8b2286f04626be39291a7527119f4 (diff)
scripts: always use printf with embedded gettext
This addresses two problems: 1) echo's behavior is inconsistent when dealing with flags, and can potentially be problematic. $ echo -n $ echo -- -n -- -n 2) Always using the end of options markers prevents translated strings from throwing errors, as shown in FS#28069. The remaining "inconsistencies" are because printf is being used in a guaranteed safe manner, e.g. printf '%s\n' "$(gettext "--this can never break")" Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/pacman-db-upgrade.sh.in')
-rw-r--r--scripts/pacman-db-upgrade.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/pacman-db-upgrade.sh.in b/scripts/pacman-db-upgrade.sh.in
index 3e0d702d..04387582 100644
--- a/scripts/pacman-db-upgrade.sh.in
+++ b/scripts/pacman-db-upgrade.sh.in
@@ -32,12 +32,12 @@ m4_include(library/output_format.sh)
usage() {
printf "pacman-db-upgrade (pacman) %s\n\n" "$myver"
- printf "$(gettext "Usage: %s [pacman_db_root]")\n\n" "$0"
+ printf -- "$(gettext "Usage: %s [pacman_db_root]")\n\n" "$0"
}
version() {
printf "pacman-db-upgrade (pacman) %s\n" "$myver"
- printf "$(gettext "\
+ printf -- "$(gettext "\
Copyright (c) 2010-2011 Pacman Development Team <pacman-dev@archlinux.org>.\n\
This is free software; see the source for copying conditions.\n\
There is NO WARRANTY, to the extent permitted by law.\n")"