diff options
author | Eric Wong <e@80x24.org> | 2020-07-26 01:59:30 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-07-26 02:13:18 +0000 |
commit | 864e2f59ac4e4aadf8c5a4bf97e35facaaea6883 (patch) | |
tree | e136be41df6caf42ba65da11dce6fad3f90f4dcc /lib/oldweb.rb | |
parent | 0be43ba42f608ea842e628d29f5c10a571d28f7a (diff) | |
download | olddoc-864e2f59ac4e4aadf8c5a4bf97e35facaaea6883.tar.gz |
Might as well, since domain name ownership is a shaky thing and ICANN may try to screw the world over once again.
Diffstat (limited to 'lib/oldweb.rb')
-rw-r--r-- | lib/oldweb.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/oldweb.rb b/lib/oldweb.rb index 74b4db1..3b2b2f2 100644 --- a/lib/oldweb.rb +++ b/lib/oldweb.rb @@ -73,23 +73,23 @@ class Oldweb noindex = @old_cfg['noindex'] and noindex.each { |k| ni[k] = true } @old_cfg['noindex'] = ni - cgit_url = @old_cfg['cgit_url'] + cgit_url = Array(@old_cfg['cgit_url']) source = @old_cfg['source_code'] ||= [] if source.empty? - if cgit_url - source << "git clone #{cgit_url}" - end + source << "git clone #{cgit_url[0]}" if cgit_url[0] git_url = @old_cfg['git_url'] - if git_url && git_url != cgit_url + if git_url && git_url != cgit_url[0] source << "git clone #{git_url}" end end - if cgit_url - cgit_url += '/tree/%s' # path name - tag = @git_tag and cgit_url << "id=#{CGI.escape(tag)}" - cgit_url << '#n%d' # lineno - @old_vcs_url = cgit_url + if cgit_url[0] + cgit_url.each do |u| + u += '/tree/%s' # path name + tag = @git_tag and u << "id=#{CGI.escape(tag)}" + u << '#n%d' # lineno + end + @old_vcs_url = cgit_url[0] end @oldweb_style = nil # used by dark216 end |