Skip to content

Instantly share code, notes, and snippets.

@caius
Created June 20, 2016 23:11
Show Gist options
  • Select an option

  • Save caius/6c516bd463067e009a32c0234dd997a4 to your computer and use it in GitHub Desktop.

Select an option

Save caius/6c516bd463067e009a32c0234dd997a4 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# You could just `gem rdoc --all`, but where's the fun in that?
gem list | \
ruby -ne 'n, v = $_.scan(/(.+) \(([\d., ]+)\)/).first; next unless v; v = v.split(", "); puts Array.new(v.length) { n }.zip(v).map {|x| x.join(" -v ") }' | \
xargs -P$(sysctl -n hw.ncpu) -L1 gem rdoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment