From 355930654693b416725e170ad0cb14d0251626e4 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 17 Feb 2008 21:15:06 -0600 Subject: scripts: allow usage when gettext is not installed Address the issue of our scripts not working so great when gettext is not available. This has come up in multiple bug reports, and is relatively easy to address by adding a simple check and a stub function if gettext was not found that simply echos the original message. Addresses concerns from FS#9214 and FS#9607. Signed-off-by: Dan McGee --- scripts/repo-remove.sh.in | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scripts/repo-remove.sh.in') diff --git a/scripts/repo-remove.sh.in b/scripts/repo-remove.sh.in index fe230b02..47a0d5ae 100644 --- a/scripts/repo-remove.sh.in +++ b/scripts/repo-remove.sh.in @@ -95,6 +95,13 @@ db_remove_entry() { # PROGRAM START +# determine whether we have gettext; make it a no-op if we do not +if [ ! $(type -t gettext) ]; then + gettext() { + echo "$@" + } +fi + # check for help flags if [ "$1" = "-h" -o "$1" = "--help" ]; then usage -- cgit v1.2.3