groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff-commit] groff ChangeLog install-sh mkinstalldirs


From: Werner LEMBERG
Subject: [Groff-commit] groff ChangeLog install-sh mkinstalldirs
Date: Sun, 04 Sep 2005 06:02:24 -0400

CVSROOT:        /cvsroot/groff
Module name:    groff
Branch:         
Changes by:     Werner LEMBERG <address@hidden> 05/09/04 10:02:23

Modified files:
        .              : ChangeLog install-sh mkinstalldirs 

Log message:
        * install-sh, mkinstalldirs: New versions; taken from texinfo CVS.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/ChangeLog.diff?tr1=1.850&tr2=1.851&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/install-sh.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/mkinstalldirs.diff?tr1=1.2&tr2=1.3&r1=text&r2=text

Patches:
Index: groff/ChangeLog
diff -u groff/ChangeLog:1.850 groff/ChangeLog:1.851
--- groff/ChangeLog:1.850       Sun Sep  4 09:57:28 2005
+++ groff/ChangeLog     Sun Sep  4 10:02:23 2005
@@ -4,6 +4,8 @@
 
        * doc/webpage.ms: Updated.
 
+       * install-sh, mkinstalldirs: New versions; taken from texinfo CVS.
+
 2005-09-04  Jörgen Grahn <address@hidden>
 
        * tmac/groff_ms.man: Document `PO' better.
Index: groff/install-sh
diff -u groff/install-sh:1.3 groff/install-sh:1.4
--- groff/install-sh:1.3        Tue Dec 21 05:56:53 2004
+++ groff/install-sh    Sun Sep  4 10:02:23 2005
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2004-12-17.09
+scriptversion=2005-07-09.12
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -109,7 +109,7 @@
         shift
         continue;;
 
-    --help) echo "$usage"; exit 0;;
+    --help) echo "$usage"; exit $?;;
 
     -m) chmodcmd="$chmodprog $2"
         shift
@@ -134,7 +134,7 @@
        shift
        continue;;
 
-    --version) echo "$0 $scriptversion"; exit 0;;
+    --version) echo "$0 $scriptversion"; exit $?;;
 
     *)  # When -d is used, all remaining arguments are directories to create.
        # When -t is used, the destination is already specified.
@@ -219,28 +219,28 @@
 
   # Skip lots of stat calls in the usual case.
   if test ! -d "$dstdir"; then
-    defaultIFS='
-        '
-    IFS="${IFS-$defaultIFS}"
-
+    case $dstdir in
+      /*) pathcomp=/ ;;
+      -*) pathcomp=./ ;;
+      *)  pathcomp= ;;
+    esac
     oIFS=$IFS
-    # Some sh's can't handle IFS=/ for some reason.
-    IFS='%'
-    set x `echo "$dstdir" | sed -e 's@/@address@hidden' -e 'address@hidden@/@'`
+    IFS=/
+    set fnord $dstdir
     shift
     IFS=$oIFS
 
-    pathcomp=
+    for d
+    do
+      test "x$d" = x && continue
 
-    while test $# -ne 0 ; do
-      pathcomp=$pathcomp$1
-      shift
+      pathcomp=$pathcomp$d
       if test ! -d "$pathcomp"; then
         $mkdirprog "$pathcomp"
        # mkdir can fail with a `File exist' error in case several
        # install-sh are creating the directory concurrently.  This
        # is OK.
-       test -d "$pathcomp" || exit
+       test -d "$pathcomp" || exit 1
       fi
       pathcomp=$pathcomp/
     done
Index: groff/mkinstalldirs
diff -u groff/mkinstalldirs:1.2 groff/mkinstalldirs:1.3
--- groff/mkinstalldirs:1.2     Tue May  4 16:54:39 2004
+++ groff/mkinstalldirs Sun Sep  4 10:02:23 2005
@@ -1,7 +1,7 @@
 #! /bin/sh
 # mkinstalldirs --- make directory hierarchy
 
-scriptversion=2004-02-15.20
+scriptversion=2005-06-29.22
 
 # Original author: Noah Friedman <address@hidden>
 # Created: 1993-05-16
@@ -12,7 +12,7 @@
 # <address@hidden>.
 
 errstatus=0
-dirmode=""
+dirmode=
 
 usage="\
 Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
@@ -27,7 +27,7 @@
   case $1 in
     -h | --help | --h*)         # -h for help
       echo "$usage"
-      exit 0
+      exit $?
       ;;
     -m)                         # -m PERM arg
       shift
@@ -37,7 +37,7 @@
       ;;
     --version)
       echo "$0 $scriptversion"
-      exit 0
+      exit $?
       ;;
     --)                         # stop option processing
       shift
@@ -103,13 +103,21 @@
 
 for file
 do
-  set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+  case $file in
+    /*) pathcomp=/ ;;
+    *)  pathcomp= ;;
+  esac
+  oIFS=$IFS
+  IFS=/
+  set fnord $file
   shift
+  IFS=$oIFS
 
-  pathcomp=
   for d
   do
-    pathcomp="$pathcomp$d"
+    test "x$d" = x && continue
+
+    pathcomp=$pathcomp$d
     case $pathcomp in
       -*) pathcomp=./$pathcomp ;;
     esac
@@ -124,7 +132,7 @@
       else
        if test ! -z "$dirmode"; then
          echo "chmod $dirmode $pathcomp"
-         lasterr=""
+         lasterr=
          chmod "$dirmode" "$pathcomp" || lasterr=$?
 
          if test ! -z "$lasterr"; then
@@ -134,7 +142,7 @@
       fi
     fi
 
-    pathcomp="$pathcomp/"
+    pathcomp=$pathcomp/
   done
 done
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]