summaryrefslogtreecommitdiffstats
path: root/scripts/build
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-09-24 18:56:07 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-09-24 18:56:07 +0200
commit4c028b37bf97294710b3ef55ea2a3ec84a1b7a3d (patch)
treec232489d4bc282ec46a5b6474a5e8e8c048e7c72 /scripts/build
parent9ff714cb6c43b920fd76ff793641c5191bf2e991 (diff)
downloadvim-polyglot-4c028b37bf97294710b3ef55ea2a3ec84a1b7a3d.tar.gz
vim-polyglot-4c028b37bf97294710b3ef55ea2a3ec84a1b7a3d.zip
Add warning to generated files
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/build b/scripts/build
index 0ed76045..482ffcf6 100755
--- a/scripts/build
+++ b/scripts/build
@@ -13,7 +13,8 @@ Dir.chdir(File.dirname(__dir__))
BASE_URL = 'https://raw.githubusercontent.com/github/linguist/master'
def read_section(name)
- File.read('polyglot.vim').match(/""" #{Regexp.escape(name)}.*\n(?=\n""")/m)[0]
+ "\" Please do not edit this file directly, instead modify polyglot.vim or scripts/build\n\n" +
+ File.read('polyglot.vim').match(/""" #{Regexp.escape(name)}\n*(.*)\n(?=\n""")/m)[1]
end
def camelize(str)