Skip to content

Instantly share code, notes, and snippets.

@kimuraw
Last active December 14, 2015 09:58
Show Gist options
  • Save kimuraw/5068437 to your computer and use it in GitHub Desktop.
Save kimuraw/5068437 to your computer and use it in GitHub Desktop.
Portfile style of rb-*|rb19-* port (MacPorts)

numbers of ruby.setup target:

% svn co https://svn.macports.org/repository/macports/trunk/dports/ruby
   :
Checked out revision 103576.
% cd ruby
% ack -a -G Portfile -h ruby\.setup | expand | sed -e 's/  */ /g' -e 's/{[^}]*}/{}/g' |
      cut -f 4 -d \ | cut -f 1 -d \: | sort | uniq -c 
  33 basic_install.rb
   7 copy_install
  58 extconf.rb
   2 fetch
 217 gem
   1 gnu
  20 install.rb
  24 setup.rb
%

Portfile style

  • use ruby.setup or not
  • use PortGroup ruby or not

result:

% ls -1 */Portfile > rb-port-all 
% ack -a -G Portfile -l -i ruby\.setup | sort > rb-port-ruby.setup 
% ack -a -G Portfile -l -i 'PortGroup\s+ruby\s+1.0' | sort > rb-port-portgroup_ruby
% comm -3 rb-port-all rb-port-ruby.setup | expand
rb-flexmock/Portfile
rb-hyperestraier/Portfile
rb-mocha/Portfile
rb-rubygems/Portfile
rb-test-spec/Portfile
rbenv/Portfile
% comm -3 rb-port-all rb-port-portgroup_ruby | expand
rbenv/Portfile
%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment