]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
examples: Extend the hello-sh example.
authorBruno Haible <bruno@clisp.org>
Fri, 27 Jun 2025 21:18:54 +0000 (23:18 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 27 Jun 2025 21:18:54 +0000 (23:18 +0200)
* gettext-tools/examples/hello-sh/hello-1.sh: Renamed from
gettext-tools/examples/hello-sh/hello.sh.
* gettext-tools/examples/hello-sh/hello-2.sh: New file, based on
gettext-tools/examples/hello-sh/hello-1.sh.
* gettext-tools/examples/hello-sh/hello-3.sh: New file, based on
gettext-tools/examples/hello-sh/hello-2.sh.
* gettext-tools/examples/hello-sh/configure.ac: Update AC_CONFIG_SRCDIR
invocation and AC_CONFIG_FILES invocations.
* gettext-tools/examples/hello-sh/Makefile.am (bin_SCRIPTS): Remove hello.
Add hello-1, hello-2, hello-3.
* gettext-tools/examples/hello-sh/po/Makefile.am (POTFILES): Remove hello.sh.
Add hello-1.sh, hello-2.sh, hello-3.sh.
* gettext-tools/examples/po/Makefile.am (POTFILES): Update accordingly.
* gettext-tools/examples/Makefile.am (EXAMPLESFILES): Update file list.

gettext-tools/examples/Makefile.am
gettext-tools/examples/hello-sh/Makefile.am
gettext-tools/examples/hello-sh/configure.ac
gettext-tools/examples/hello-sh/hello-1.sh [moved from gettext-tools/examples/hello-sh/hello.sh with 81% similarity]
gettext-tools/examples/hello-sh/po/Makefile.am
gettext-tools/examples/po/Makefile.am

index 3b9fcabca952e579c9e2b04ec5131b24baf1b6df..41e0c2108816ca09062462dc4be04ef93be707a7 100644 (file)
@@ -376,7 +376,9 @@ EXAMPLESFILES = \
   hello-sh/INSTALL \
   hello-sh/autogen.sh \
   hello-sh/autoclean.sh \
-  hello-sh/hello.sh \
+  hello-sh/hello-1.sh \
+  hello-sh/hello-2.sh \
+  hello-sh/hello-3.sh \
   hello-sh/Makefile.am \
   hello-sh/configure.ac \
   hello-sh/m4/Makefile.am \
index b76e71d94a2fe75afa8bf3b55bef12edf344ed34..ccf4235b3d4a040747f8a70baa363e84f4241b01 100644 (file)
@@ -11,7 +11,7 @@ ACLOCAL_AMFLAGS = -I m4
 SUBDIRS = m4 po
 
 # The list of programs that are built.
-bin_SCRIPTS = hello
+bin_SCRIPTS = hello-1 hello-2 hello-3
 
 # Additional files to be distributed.
 EXTRA_DIST = autogen.sh autoclean.sh
index f9adb480188afea5432234afaadaae5d1e441563..51522b501cbfdb91a3c4ccbe6a5132597163c68a 100644 (file)
@@ -4,7 +4,7 @@ dnl
 dnl Configuration file - processed by autoconf.
 
 AC_INIT([hello-sh], [0])
-AC_CONFIG_SRCDIR([hello.sh])
+AC_CONFIG_SRCDIR([hello-1.sh])
 AM_INIT_AUTOMAKE([1.11])
 
 dnl The installed program must know where to find its message catalogs.
@@ -25,7 +25,9 @@ dnl Support for the po directory.
 AM_PO_SUBDIRS
 
 AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([hello:hello.sh], [chmod a+x hello])
+AC_CONFIG_FILES([hello-1:hello-1.sh], [chmod a+x hello-1])
+AC_CONFIG_FILES([hello-2:hello-2.sh], [chmod a+x hello-2])
+AC_CONFIG_FILES([hello-3:hello-3.sh], [chmod a+x hello-3])
 AC_CONFIG_FILES([m4/Makefile])
 AC_CONFIG_FILES([po/Makefile], [AM_POSTPROCESS_PO_MAKEFILE])
 AC_OUTPUT
similarity index 81%
rename from gettext-tools/examples/hello-sh/hello.sh
rename to gettext-tools/examples/hello-sh/hello-1.sh
index 82e41bbaebf7f2a42bb5a2fc279059375a5bb231..69bafdae7b6f6e554c28412fb4b2d4aaee36e6f4 100644 (file)
@@ -2,7 +2,7 @@
 # Example for use of GNU gettext.
 # This file is in the public domain.
 #
-# Source code of the POSIX sh program.
+# Source code of the POSIX sh program that uses the gettext.sh API.
 
 . gettext.sh
 
index d6de1ef0b96a83aabe53a82b3a37fb20783a2cbe..7b842f2bd0bb16138cbb0f1121484c8cfad1b2b5 100644 (file)
@@ -5,7 +5,7 @@
 
 # List of files which contain translatable strings.
 POTFILES = \
-  hello.sh
+  hello-1.sh hello-2.sh hello-3.sh
 
 # Usually the message domain is the same as the package name.
 DOMAIN = $(PACKAGE)
index 5764d84fbf1171f489efbb0f1bd91b5d5ba5043e..ef3c9247a0230b42cee0f13d54405671b7c07ee7 100644 (file)
@@ -65,7 +65,9 @@ POTFILES = \
   hello-go/example3/hello3ml.go.in \
   hello-go-http/example1/hello1ml.go.in \
   hello-ruby/hello.rb \
-  hello-sh/hello.sh \
+  hello-sh/hello-1.sh \
+  hello-sh/hello-2.sh \
+  hello-sh/hello-3.sh \
   hello-gawk/hello.awk \
   hello-pascal/hello.pas \
   hello-modula2/hello.mod.in \