From 9e9835f4640a45cc758fa64de5923d7f836fe1f4 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 23 Jan 2012 17:14:25 -0500 Subject: 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 Signed-off-by: Dan McGee --- scripts/pacman-optimize.sh.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts/pacman-optimize.sh.in') diff --git a/scripts/pacman-optimize.sh.in b/scripts/pacman-optimize.sh.in index 5ff302e2..74af0e5d 100644 --- a/scripts/pacman-optimize.sh.in +++ b/scripts/pacman-optimize.sh.in @@ -33,11 +33,11 @@ m4_include(library/output_format.sh) usage() { printf "pacman-optimize (pacman) %s\n\n" "$myver" - printf "$(gettext "Usage: %s [pacman_db_root]")\n\n" "$0" - printf "$(gettext "\ + printf -- "$(gettext "Usage: %s [pacman_db_root]")\n\n" "$0" + printf -- "$(gettext "\ pacman-optimize is a little hack that should improve the performance\n\ of pacman when reading/writing to its filesystem-based database.\n\n")" - printf "$(gettext "\ + printf -- "$(gettext "\ Because pacman uses many small files to keep track of packages,\n\ there is a tendency for these files to become fragmented over time.\n\ This script attempts to relocate these small files into one\n\ @@ -48,7 +48,7 @@ does not have to move around the disk as much.\n")" version() { printf "pacman-optimize (pacman) %s\n" "$myver" - printf "$(gettext "\ + printf -- "$(gettext "\ Copyright (c) 2006-2011 Pacman Development Team .\n\ Copyright (C) 2002-2006 Judd Vinet .\n\n\ This is free software; see the source for copying conditions.\n\ -- cgit v1.2.3-54-g00ecf From 5c2928aa259cac1dcdaa8b27172c2ee12327d21a Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 30 Jan 2012 21:43:23 -0600 Subject: Make a few more copyright date tweaks Signed-off-by: Dan McGee --- doc/index.txt | 2 +- scripts/pacman-db-upgrade.sh.in | 4 ++-- scripts/pacman-optimize.sh.in | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts/pacman-optimize.sh.in') diff --git a/doc/index.txt b/doc/index.txt index c36dfbf2..f7a16105 100644 --- a/doc/index.txt +++ b/doc/index.txt @@ -256,7 +256,7 @@ Pacman/libalpm frontends: Copyright --------- -pacman is Copyright (C) 2006-2011 Pacman Development Team +pacman is Copyright (C) 2006-2012 Pacman Development Team and Copyright (C) 2002-2006 Judd Vinet and is licensed through the GNU General Public License, version 2 or later. diff --git a/scripts/pacman-db-upgrade.sh.in b/scripts/pacman-db-upgrade.sh.in index 04387582..e0a049c5 100644 --- a/scripts/pacman-db-upgrade.sh.in +++ b/scripts/pacman-db-upgrade.sh.in @@ -3,7 +3,7 @@ # pacman-db-upgrade - upgrade the local pacman db to a newer format # @configure_input@ # -# Copyright (c) 2010-2011 Pacman Development Team +# Copyright (c) 2010-2012 Pacman Development Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -38,7 +38,7 @@ usage() { version() { printf "pacman-db-upgrade (pacman) %s\n" "$myver" printf -- "$(gettext "\ -Copyright (c) 2010-2011 Pacman Development Team .\n\ +Copyright (c) 2010-2012 Pacman Development Team .\n\ This is free software; see the source for copying conditions.\n\ There is NO WARRANTY, to the extent permitted by law.\n")" } diff --git a/scripts/pacman-optimize.sh.in b/scripts/pacman-optimize.sh.in index 74af0e5d..47d8814a 100644 --- a/scripts/pacman-optimize.sh.in +++ b/scripts/pacman-optimize.sh.in @@ -3,7 +3,7 @@ # pacman-optimize # @configure_input@ # -# Copyright (c) 2006-2011 Pacman Development Team +# Copyright (c) 2006-2012 Pacman Development Team # Copyright (c) 2002-2006 by Judd Vinet # # This program is free software; you can redistribute it and/or modify @@ -49,7 +49,7 @@ does not have to move around the disk as much.\n")" version() { printf "pacman-optimize (pacman) %s\n" "$myver" printf -- "$(gettext "\ -Copyright (c) 2006-2011 Pacman Development Team .\n\ +Copyright (c) 2006-2012 Pacman Development Team .\n\ Copyright (C) 2002-2006 Judd Vinet .\n\n\ This is free software; see the source for copying conditions.\n\ There is NO WARRANTY, to the extent permitted by law.\n")" -- cgit v1.2.3-54-g00ecf