summaryrefslogtreecommitdiff
path: root/tool/rbuninstall.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-05-09 01:40:40 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-05-09 01:40:40 +0900
commit8830d60dae428bcdc37244cc2cc6a41900d0ab78 (patch)
tree7ed588eba0708cc569d46063776f691c4d58e0ba /tool/rbuninstall.rb
parent721060388e0d78fdac7ce7669a0d84ff0d6a7d92 (diff)
rbuninstall.rb: print output record separator instead of $\
Diffstat (limited to 'tool/rbuninstall.rb')
-rwxr-xr-xtool/rbuninstall.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/tool/rbuninstall.rb b/tool/rbuninstall.rb
index eb324c9..736213f 100755
--- a/tool/rbuninstall.rb
+++ b/tool/rbuninstall.rb
@@ -27,9 +27,10 @@ $_ = File.join($destdir, $_) if $destdir
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 @@ END {
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
end
- $\ = nil
print ors.chomp
exit(status)
}