This commit is contained in:
10
scripts/update-progress.rb
Normal file
10
scripts/update-progress.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
pattern = /(<!--\s*AUTOGEN:pct\s*-->\n)(.*)(\n<!--\s*END:pct\s*-->)/m
|
||||
|
||||
readme_contents = File.read('README.md')
|
||||
new_pct = ARGV[0]
|
||||
badge = ""
|
||||
new_readme_contents = readme_contents.gsub(pattern, %{\\1#{badge}\\3})
|
||||
puts new_readme_contents
|
||||
File.write('README.md', new_readme_contents)
|
||||
Reference in New Issue
Block a user