/[autoconf]/autoconf/lib/Autom4te/FileUtils.pm
ViewVC logotype

Diff of /autoconf/lib/Autom4te/FileUtils.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by akim, Tue Sep 9 12:28:19 2003 UTC revision 1.5 by akim, Tue Sep 9 15:44:57 2003 UTC
# Line 145  sub update_file ($$) Line 145  sub update_file ($$)
145            print $out $_;            print $out $_;
146          }          }
147        $in->close;        $in->close;
148        unlink ($from) || fatal "cannot not remove $from: $!";        unlink ($from) || fatal "cannot remove $from: $!";
149        return;        return;
150      }      }
151    
# Line 154  sub update_file ($$) Line 154  sub update_file ($$)
154        # File didn't change, so don't update its mod time.        # File didn't change, so don't update its mod time.
155        msg 'note', "`$to' is unchanged";        msg 'note', "`$to' is unchanged";
156        unlink ($from)        unlink ($from)
157          or fatal "cannot not remove $from: $!";          or fatal "cannot remove $from: $!";
158        return        return
159      }      }
160    
# Line 162  sub update_file ($$) Line 162  sub update_file ($$)
162      {      {
163        # Back up and install the new one.        # Back up and install the new one.
164        move ("$to",  "$to$SIMPLE_BACKUP_SUFFIX")        move ("$to",  "$to$SIMPLE_BACKUP_SUFFIX")
165          or fatal "cannot not backup $to: $!";          or fatal "cannot backup $to: $!";
166        move ("$from", "$to")        move ("$from", "$to")
167          or fatal "cannot not rename $from as $to: $!";          or fatal "cannot rename $from as $to: $!";
168        msg 'note', "`$to' is updated";        msg 'note', "`$to' is updated";
169      }      }
170    else    else
171      {      {
172        move ("$from", "$to")        move ("$from", "$to")
173          or fatal "cannot not rename $from as $to: $!";          or fatal "cannot rename $from as $to: $!";
174        msg 'note', "`$to' is created";        msg 'note', "`$to' is created";
175      }      }
176  }  }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26