From: Bruno Haible Date: Wed, 17 Sep 2003 08:21:59 +0000 (+0000) Subject: Support for internationalized shell scripts: Shell functions. X-Git-Tag: v0.13~254 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9d4b651d5963e45c1628da00930f20d641b00f73;p=thirdparty%2Fgettext.git Support for internationalized shell scripts: Shell functions. --- diff --git a/gettext-runtime/src/gettext.sh b/gettext-runtime/src/gettext.sh new file mode 100644 index 000000000..1593ce8b0 --- /dev/null +++ b/gettext-runtime/src/gettext.sh @@ -0,0 +1,73 @@ +#! /bin/false +# +# Copyright (C) 2003 Free Software Foundation, Inc. +# +# 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 +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +# Find a way to echo strings without interpreting backslash. +if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then + echo='echo' +else + if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then + echo='printf %s\n' + else + echo_func () { + cat <