Skip to content

Instantly share code, notes, and snippets.

@roidrage
Last active May 3, 2018 04:46
Show Gist options
  • Save roidrage/5238585 to your computer and use it in GitHub Desktop.
Save roidrage/5238585 to your computer and use it in GitHub Desktop.
A simple wrapper that forks off a child and prints out a progress dot every X seconds
#!/usr/bin/env ruby
pid = Kernel.fork do
`#{ARGV.join(" ")}`
exit
end
trap(:CHLD) do
print "\n"
exit
end
loop do
sleep 10
begin
Process.kill(0, pid)
print '.'
rescue Errno::ESRCH
print "\n"
exit 0
end
end
@s-sajid-ali
Copy link

Could you give more info as to how one would use the above ? Where does one specify the command to build a package in the above ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment