mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
rbuninstall.rb: print output record separator instead of $\
This commit is contained in:
parent
721060388e
commit
8830d60dae
1 changed files with 4 additions and 4 deletions
|
@ -27,9 +27,10 @@ $_ = File.join($destdir, $_) if $destdir
|
||||||
list << $_
|
list << $_
|
||||||
END {
|
END {
|
||||||
status = true
|
status = true
|
||||||
$\ = ors = (!$dryrun and $tty) ? "\e[K\r" : "\n"
|
$\ = nil
|
||||||
|
ors = (!$dryrun and $tty) ? "\e[K\r" : "\n"
|
||||||
$files.each do |file|
|
$files.each do |file|
|
||||||
print "rm #{file}"
|
print "rm #{file}#{ors}"
|
||||||
unless $dryrun
|
unless $dryrun
|
||||||
begin
|
begin
|
||||||
File.unlink(file)
|
File.unlink(file)
|
||||||
|
@ -45,7 +46,7 @@ END {
|
||||||
unlink[dir] = true
|
unlink[dir] = true
|
||||||
end
|
end
|
||||||
while dir = $dirs.pop
|
while dir = $dirs.pop
|
||||||
print "rmdir #{dir}"
|
print "rmdir #{dir}#{ors}"
|
||||||
unless $dryrun
|
unless $dryrun
|
||||||
begin
|
begin
|
||||||
begin
|
begin
|
||||||
|
@ -65,7 +66,6 @@ END {
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
$\ = nil
|
|
||||||
print ors.chomp
|
print ors.chomp
|
||||||
exit(status)
|
exit(status)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue