]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
msginit: Improvements for Cygwin and Android.
authorBruno Haible <bruno@clisp.org>
Wed, 1 May 2019 19:30:00 +0000 (21:30 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 1 May 2019 19:30:00 +0000 (21:30 +0200)
* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add sh-filename.
* gettext-tools/src/msginit.c (project_id, project_id_version, get_user_email,
language_team_address): Use BOURNE_SHELL instead of hardcoding /bin/sh.

autogen.sh
gettext-tools/src/msginit.c

index 1e0ed89783ac896c0ab9f0340698e29cf54b9699..a0f4ece2c4480aed1925b401cb1842cff1833c7e 100755 (executable)
@@ -176,6 +176,7 @@ if ! $skip_gnulib; then
     relocatable-prog
     relocatable-script
     setlocale
+    sh-filename
     sh-quote
     sigpipe
     sigprocmask
index 889bd46627af0cf6a936aad6d9af2de2f28e0f2c..1d90717fe38beb8bea9874a4dbf3d0f9b4029a43 100644 (file)
@@ -881,11 +881,11 @@ project_id (const char *header)
   prog = xconcatenated_filename (gettextlibdir, "project-id", NULL);
 
   /* Call the project-id shell script.  */
-  argv[0] = "/bin/sh";
+  argv[0] = BOURNE_SHELL;
   argv[1] = prog;
   argv[2] = NULL;
-  child = create_pipe_in (prog, "/bin/sh", argv, DEV_NULL, false, true, false,
-                          fd);
+  child = create_pipe_in (prog, BOURNE_SHELL, argv, DEV_NULL, false, true,
+                          false, fd);
   if (child == -1)
     goto failed;
 
@@ -955,12 +955,12 @@ project_id_version (const char *header)
   prog = xconcatenated_filename (gettextlibdir, "project-id", NULL);
 
   /* Call the project-id shell script.  */
-  argv[0] = "/bin/sh";
+  argv[0] = BOURNE_SHELL;
   argv[1] = prog;
   argv[2] = "yes";
   argv[3] = NULL;
-  child = create_pipe_in (prog, "/bin/sh", argv, DEV_NULL, false, true, false,
-                          fd);
+  child = create_pipe_in (prog, BOURNE_SHELL, argv, DEV_NULL, false, true,
+                          false, fd);
   if (child == -1)
     goto failed;
 
@@ -1114,15 +1114,15 @@ get_user_email ()
   int exitstatus;
 
   /* Ask the user for his email address.  */
-  argv[0] = "/bin/sh";
+  argv[0] = BOURNE_SHELL;
   argv[1] = (char *) prog;
   argv[2] = (char *) _("\
 The new message catalog should contain your email address, so that users can\n\
 give you feedback about the translations, and so that maintainers can contact\n\
 you in case of unexpected technical problems.\n");
   argv[3] = NULL;
-  child = create_pipe_in (prog, "/bin/sh", argv, DEV_NULL, false, true, false,
-                          fd);
+  child = create_pipe_in (prog, BOURNE_SHELL, argv, DEV_NULL, false, true,
+                          false, fd);
   if (child == -1)
     goto failed;
 
@@ -1213,15 +1213,15 @@ language_team_address ()
   int exitstatus;
 
   /* Call the team-address shell script.  */
-  argv[0] = "/bin/sh";
+  argv[0] = BOURNE_SHELL;
   argv[1] = (char *) prog;
   argv[2] = (char *) relocate (PROJECTSDIR);
   argv[3] = (char *) relocate (LIBDIR "/gettext");
   argv[4] = (char *) catalogname;
   argv[5] = (char *) language;
   argv[6] = NULL;
-  child = create_pipe_in (prog, "/bin/sh", argv, DEV_NULL, false, true, false,
-                          fd);
+  child = create_pipe_in (prog, BOURNE_SHELL, argv, DEV_NULL, false, true,
+                          false, fd);
   if (child == -1)
     goto failed;