Link directly to bitbucket repos where applicable

This commit is contained in:
Steve Purcell 2013-04-14 08:25:39 +01:00
parent da48d14bd4
commit d73b380e0f

View file

@ -22,6 +22,10 @@
case package.source
when 'github' then recipe['repo'].include?('/') ? "https://github.com/#{recipe['repo']}" : "https://gist.github.com/#{recipe['repo']}"
when 'wiki' then recipe.key?('files') ? nil : "http://www.emacswiki.org/emacs/#{package.name}.el"
when 'hg' then
if recipe['url'] =~ /(bitbucket\.org\/[^\/]+\/[^\/\?]+)/
"https://" + $1
end
end
package
end