OSSP CVS Repository

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

Check-in Number: 3329
Date: 2003-May-09 11:50:13 (local)
2003-May-09 09:50:13 (UTC)
User:rse
Branch:
Comment: Fix calculation of effective source path in "shtool mkln" command for destination paths containing "/./" sequence and for source paths consisting of no directory parts at all.

Discovered by: Michael Schloh v. Bennewitz <michael@schloh.com>

Tickets:
Inspections:
Files:
ossp-pkg/shtool/ChangeLog      1.185 -> 1.186     7 inserted, 1 deleted
ossp-pkg/shtool/README      1.93 -> 1.94     1 inserted, 1 deleted
ossp-pkg/shtool/VERSION      1.70 -> 1.71     1 inserted, 1 deleted
ossp-pkg/shtool/sh.mkln      1.14 -> 1.15     8 inserted, 2 deleted

ossp-pkg/shtool/ChangeLog 1.185 -> 1.186

--- ChangeLog    2003/04/29 08:01:00     1.185
+++ ChangeLog    2003/05/09 09:50:13     1.186
@@ -9,7 +9,13 @@
 
  ChangeLog
 
- Changes between 1.6.2 and 2.0b0 (02-Nov-2002 to xx-Apr-2003):
+ Changes between 1.6.2 and 2.0b0 (02-Nov-2002 to xx-May-2003):
+
+   *) Fix calculation of effective source path in "shtool mkln" command
+      for destination paths containing "/./" sequence and for source paths
+      consisting of no directory parts at all.
+      [Ralf S. Engelschall <rse@engelschall.com>,
+       Michael Schloh v. Bennewitz <michael@schloh.com>]
 
    *) Use "env -i /bin/ls" construct in "shtool rotate" and "shtool slo"
       commands to make sure we have a consistent output not adjusted by


ossp-pkg/shtool/README 1.93 -> 1.94

--- README       2003/04/29 08:01:40     1.93
+++ README       2003/05/09 09:50:13     1.94
@@ -10,7 +10,7 @@
   http://www.gnu.org/software/shtool/
   ftp://ftp.gnu.org/gnu/shtool/
 
-  Version 2.0b0 (29-Apr-2003)
+  Version 2.0b0 (09-May-2003)
 
   The GNU shtool program is a compilation of small but very stable and
   portable shell scripts into a single shell tool. All ingredients


ossp-pkg/shtool/VERSION 1.70 -> 1.71

--- VERSION      2003/04/29 08:01:40     1.70
+++ VERSION      2003/05/09 09:50:13     1.71
@@ -2,5 +2,5 @@
   VERSION -- Version Information for GNU shtool (syntax: Text)
   [automatically generated and maintained by GNU shtool]
 
-  This is GNU shtool, Version 2.0b0 (29-Apr-2003)
+  This is GNU shtool, Version 2.0b0 (09-May-2003)
 


ossp-pkg/shtool/sh.mkln 1.14 -> 1.15

--- sh.mkln      2003/02/11 13:00:50     1.14
+++ sh.mkln      2003/05/09 09:50:13     1.15
@@ -30,6 +30,7 @@
 
 . ./sh.common
 
+#   determine source(s) and destination
 args=$?
 srcs=""
 while [ $# -gt 1 ]; do
@@ -94,7 +95,11 @@
     #   make sure the source is reachable from the destination
     if [ $dstisabs = 1 ]; then
         if [ $srcisabs = 0 ]; then
-            if [ -d $srcdir ]; then
+            if [ ".$srcdir" = . ]; then
+                srcdir="`pwd | sed -e 's;/*$;;'`"
+                srcisabs=1
+                oneisabs=1
+            elif [ -d $srcdir ]; then
                 srcdir="`cd $srcdir; pwd | sed -e 's;/*$;;'`"
                 srcisabs=1
                 oneisabs=1
@@ -131,7 +136,8 @@
         pl="$dstdir/"
         OIFS="$IFS"; IFS='/'
         for pe in $pl; do
-            [ ".$pe" = . ] && continue
+            [ ".$pe" = .  ] && continue
+            [ ".$pe" = .. ] && continue
             srcpre="../$srcpre"
         done
         IFS="$OIFS"

CVSTrac 2.0.1