forked from jingoro/nanoc-html5boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.update.rb
35 lines (32 loc) · 1.57 KB
/
.update.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Updates local files with latest from html5-boilerplate github repository.
require 'open-uri'
BASE_DIR = File.dirname(__FILE__)
BASE_URL = 'https://raw.github.com/h5bp/html5-boilerplate/master'
{
'.gitattributes' => 'h5bp.gitattributes',
'.gitignore' => 'h5bp.gitignore',
'.htaccess' => 'h5bp.htaccess',
'404.html' => 'content/404.html',
'LICENSE.md' => 'h5bp.LICENSE.md',
'apple-touch-icon-114x114-precomposed.png' => 'content/apple-touch-icon-114x114-precomposed.png',
'apple-touch-icon-144x144-precomposed.png' => 'content/apple-touch-icon-144x144-precomposed.png',
'apple-touch-icon-57x57-precomposed.png' => 'content/apple-touch-icon-57x57-precomposed.png',
'apple-touch-icon-72x72-precomposed.png' => 'content/apple-touch-icon-72x72-precomposed.png',
'apple-touch-icon-precomposed.png' => 'content/apple-touch-icon-precomposed.png',
'apple-touch-icon.png' => 'content/apple-touch-icon.png',
'crossdomain.xml' => 'content/crossdomain.xml',
'favicon.ico' => 'content/favicon.ico',
'humans.txt' => 'content/humans.txt',
'robots.txt' => 'content/robots.txt',
'css/main.css' => 'content/css/_main.scss',
'css/normalize.css' => 'content/css/_normalize.scss',
'js/vendor/jquery-1.8.3.min.js' => 'content/js/vendor/jquery.js',
'js/vendor/modernizr-2.6.2.min.js' => 'content/js/vendor/modernizr.js',
'js/main.js' => 'content/js/_main.js',
'js/plugins.js' => 'content/js/_plugins.js',
}.each do |repo_file, local_file|
puts "Updating #{local_file}"
open("#{BASE_DIR}/#{local_file}", 'wb') do |file|
file << open("#{BASE_URL}/#{repo_file}").read
end
end