rbuninstall.rb: print output record separator instead of $\

上级 72106038
......@@ -27,9 +27,10 @@
list << $_
END {
status = true
$\ = ors = (!$dryrun and $tty) ? "\e[K\r" : "\n"
$\ = nil
ors = (!$dryrun and $tty) ? "\e[K\r" : "\n"
$files.each do |file|
print "rm #{file}"
print "rm #{file}#{ors}"
unless $dryrun
begin
File.unlink(file)
......@@ -45,7 +46,7 @@
unlink[dir] = true
end
while dir = $dirs.pop
print "rmdir #{dir}"
print "rmdir #{dir}#{ors}"
unless $dryrun
begin
begin
......@@ -65,7 +66,6 @@
end
end
end
$\ = nil
print ors.chomp
exit(status)
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册