diff options
Diffstat (limited to 'bin/index')
-rwxr-xr-x | bin/index | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -4,12 +4,18 @@ load 'util.rb' require 'yaml' # ARGV[0] -template = "bin/index.#{ARGV.shift}.erb" +type = ARGV.shift +template = "bin/index.#{type}.erb" erb = ERB.new(File.read(template)); erb.filename = template # ARGV[1] @path = ARGV.shift +webpath = (@path+'/').sub(/^(src|out)\//, '/') +if type == 'atom' + webpath += 'index.atom' +end +@url = URI::parse('https://www.andrewdm.me') + webpath indexyaml = @path.sub('out', 'src')+'/index.yaml' if File.exists?(indexyaml) |