OSSP CVS Repository

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

Check-in Number: 3342
Date: 2003-May-16 10:46:26 (local)
2003-May-16 08:46:26 (UTC)
User:rse
Branch:
Comment: When patching a file with "shtool subst" try to make it writeable first in case it has permissions set differently.
Tickets:
Inspections:
Files:
ossp-pkg/shtool/ChangeLog      1.186 -> 1.187     4 inserted, 0 deleted
ossp-pkg/shtool/sh.subst      1.7 -> 1.8     2 inserted, 0 deleted

ossp-pkg/shtool/ChangeLog 1.186 -> 1.187

--- ChangeLog    2003/05/09 09:50:13     1.186
+++ ChangeLog    2003/05/16 08:46:26     1.187
@@ -11,6 +11,10 @@
 
  Changes between 1.6.2 and 2.0b0 (02-Nov-2002 to xx-May-2003):
 
+   *) When patching a file with "shtool subst" try to make it
+      writeable first in case it has permissions set differently.
+      [Ralf S. Engelschall <rse@engelschall.com>]
+
    *) 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.


ossp-pkg/shtool/sh.subst 1.7 -> 1.8

--- sh.subst     2003/02/11 13:00:50     1.7
+++ sh.subst     2003/05/16 08:46:26     1.8
@@ -124,10 +124,12 @@
         fi
         if [ ".$opt_t" = .yes ]; then
             echo "\$ cp -p $file $file$orig"
+            echo "\$ chmod u+w $file"
             echo "\$ $sedcmd <$file$orig >$file"
         fi
         if [ ".$opt_n" = .no ]; then
             cp -p $file $file$orig
+            chmod u+w $file >/dev/null 2>&1 || true
             eval "$sedcmd <$file$orig >$file"
         fi
 

CVSTrac 2.0.1