きりかノート 3冊め

おあそびプログラミング

licenseがどのくらい埋まってるかを確認してみる

さいきんMacPortsで「Portfileのlicenseを埋めよう」活動が盛んなようなので、自分の担当とrb-, rb19-くらいは見ておこうかなあと現状を確認。

なんかgrep系いっぱつでできそうな気がするんだけど…

 % svn info
 Path: .
 URL: https://svn.macosforge.org/repository/macports/trunk/dports/ruby
 Repository Root: https://svn.macosforge.org/repository/macports
 Repository UUID: d073be05-634f-4543-b044-5fe20cf6d1d6
 Revision: 85577
 Node Kind: directory
 Schedule: normal
 Last Changed Author: kimuraw@macports.org
 Last Changed Rev: 85410
 Last Changed Date: 2011-10-13 20:07:46 +0900 (Thu, 13 Oct 2011)
 #### すべてのportの一覧を作成 (1) ####
 % find . -name Portfile -depth 2 | cut -c3- | sort > port-rb-all.txt
 % head port-rb-all.txt
 rb-acl/Portfile
 rb-actionmailer/Portfile
 rb-actionpack/Portfile
 rb-actionwebservice/Portfile
 rb-activeldap/Portfile
 #### licenseの記述があるportの一覧を作成 (2) ####
 % ack -a -G Portfile -l '^license' | sort > port-rb-license.txt
 % head port-rb-license.txt
 rb-atk/Portfile
 rb-bdb/Portfile
 rb-bee/Portfile
 rb-clutter/Portfile
 rb-cmdparse/Portfile
 #### (1)にだけ含まれる=ライセンス未記述の一覧を作成 (3) ####
 % comm -23 port-rb-all.txt port-rb-license.txt > port-rb-nolicense.txt
 % head port-rb-nolicense.txt
 rb-acl/Portfile
 rb-actionmailer/Portfile
 rb-actionpack/Portfile
 rb-actionwebservice/Portfile
 rb-activeldap/Portfile
 % wc -l port-rb-*
      363 port-rb-all.txt
      163 port-rb-license.txt
      200 port-rb-nolicense.txt
      726 total

あと200かあ。