summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
Diffstat (limited to 'source4/script')
-rwxr-xr-xsource4/script/minimal_includes.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/script/minimal_includes.pl b/source4/script/minimal_includes.pl
index d64409ed13..990ff00025 100755
--- a/source4/script/minimal_includes.pl
+++ b/source4/script/minimal_includes.pl
@@ -67,7 +67,10 @@ sub test_include($$$$)
$lines->[$i] = "";
- `/bin/mv -f $fname $fname.misaved` && die "failed to rename $fname";
+ my $mname = $fname . ".misaved";
+
+ unlink($mname);
+ rename($fname, $mname) || die "failed to rename $fname";
save_lines($fname, $lines);
my $out = test_compile($fname);
@@ -79,6 +82,7 @@ sub test_include($$$$)
print "$fname: not removing system include $line\n";
} else {
print "$fname: removing $line\n";
+ unlink($mname);
return;
}
} else {
@@ -87,7 +91,7 @@ sub test_include($$$$)
}
$lines->[$i] = $line;
- `/bin/mv -f $fname.misaved $fname` && die "failed to restore $fname";
+ rename($mname, $fname) || die "failed to restore $fname";
}
sub process_file($)