OSSP CVS Repository

ossp - Check-in [5279]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 5279
Date: 2005-Oct-12 14:34:50 (local)
2005-Oct-12 12:34:50 (UTC)
User:rse
Branch:
Comment: Enhance portability even more by maximizing Bourne Shell compatibility under ZSH and BASH and avoiding NLS dependencies.

Hint by: R. N. de Arenas Coronado <privado@dervishd.net>

Tickets:
Inspections:
Files:
ossp-pkg/shtool/ChangeLog      1.219 -> 1.220     4 inserted, 0 deleted
ossp-pkg/shtool/THANKS      1.35 -> 1.36     1 inserted, 0 deleted
ossp-pkg/shtool/shtoolize.in      1.35 -> 1.36     25 inserted, 0 deleted

ossp-pkg/shtool/ChangeLog 1.219 -> 1.220

--- ChangeLog    2005/10/12 12:31:28     1.219
+++ ChangeLog    2005/10/12 12:34:50     1.220
@@ -11,6 +11,10 @@
 
  Changes between 2.0.3 and 2.0.4 (02-Oct-2005 to xx-xxx-2005):
 
+   *) Enhance portability even more by maximizing Bourne Shell
+      compatibility under ZSH and BASH and avoiding NLS dependencies.
+      [R. N. de Arenas Coronado <privado@dervishd.net>]
+
    *) Use internal util_{lower,upper} functions in "shtool version".
       [Ralf S. Engelschall]
 


ossp-pkg/shtool/THANKS 1.35 -> 1.36

--- THANKS       2005/10/02 14:23:12     1.35
+++ THANKS       2005/10/12 12:34:50     1.36
@@ -15,6 +15,7 @@
   o Denis Barbier            <barbier@imacs.polytechnique.fr>
   o Marcus Boerger           <marcus.boerger@t-online.de>
   o Bill Campbell            <bill@celestial.com>
+  o R. N. de Arenas Coronado <privado@dervishd.net>
   o Paul Eggert              <eggert@twinsun.com>
   o Alan Eldridge            <alane@geeksrus.net>
   o Michael van Elst         <mlelstv@serpens.de>


ossp-pkg/shtool/shtoolize.in 1.35 -> 1.36

--- shtoolize.in 2005/06/15 08:14:36     1.35
+++ shtoolize.in 2005/10/12 12:34:50     1.36
@@ -389,6 +389,31 @@
 ${overview}
 ##
 
+#   maximum Bourne-Shell compatibility
+if [ ".\$ZSH_VERSION" != . ] && (emulate sh) >/dev/null 2>&1; then
+    #   reconfigure zsh(1)
+    emulate sh
+    NULLCMD=:
+    alias -g '\${1+"\$@"}'='"\$@"'
+elif [ ".\$BASH_VERSION" != . ] && (set -o posix) >/dev/null 2>&1; then
+    #   reconfigure bash(1)
+    set -o posix
+fi
+
+#   maximum independence of NLS nuisances
+for var in \\
+    LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \\
+    LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \\
+    LC_TELEPHONE LC_TIME
+do
+    if (set +x; test -z "`(eval \$var=C; export \$var) 2>&1`"); then
+        eval \$var=C; export \$var
+    else
+        unset \$var
+    fi
+done
+
+#   initial command line handling
 if [ \$# -eq 0 ]; then
     echo "\$0:Error: invalid command line" 1>&2
     echo "\$0:Hint:  run \\`\$0 -h' for usage" 1>&2

CVSTrac 2.0.1