diff options
| author | Adam Stankiewicz <sheerun@sher.pl> | 2015-07-18 22:34:26 +0200 | 
|---|---|---|
| committer | Adam Stankiewicz <sheerun@sher.pl> | 2015-07-18 22:34:26 +0200 | 
| commit | 548653cafeaa948161ad9ac8184deca0bff95537 (patch) | |
| tree | a51a66b1473c16a8ba245739450c1178c3ebc33c | |
| parent | ee6b1ea1574dbc6d651f7a63b26a1f9b95998249 (diff) | |
| download | vim-polyglot-548653cafeaa948161ad9ac8184deca0bff95537.tar.gz vim-polyglot-548653cafeaa948161ad9ac8184deca0bff95537.zip | |
Automatically update README upon build
Diffstat (limited to '')
| -rw-r--r-- | README.md | 1 | ||||
| -rwxr-xr-x | build | 28 | 
2 files changed, 27 insertions, 2 deletions
| @@ -66,6 +66,7 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo  - [protobuf](https://github.com/uarun/vim-protobuf) (syntax, ftdetect)  - [python](https://github.com/mitsuhiko/vim-python-combined) (syntax, indent)  - [r-lang](https://github.com/vim-scripts/R.vim) (syntax, ftplugin) +- [ragel](https://github.com/jneen/ragel.vim) (syntax)  - [rspec](https://github.com/sheerun/rspec.vim) (syntax, ftdetect)  - [ruby](https://github.com/vim-ruby/vim-ruby) (syntax, indent, compiler, autoload, ftplugin, ftdetect)  - [rust](https://github.com/wting/rust.vim) (syntax, indent, compiler, autoload, ftplugin, ftdetect) @@ -5,6 +5,13 @@ set -E  DIRS="syntax indent compiler autoload ftplugin ftdetect after/syntax after/indent after/ftplugin after/ftdetect"  DIRS_BASIC="syntax indent ftdetect after/syntax after/indent after/ftdetect" +OUTPUT="" + +output() { +  OUTPUT="$OUTPUT$1" +  printf -- "$1" +} +  download() {    for pack in $1; do      path="$(printf "$pack" | cut -d ':' -f 2)" @@ -24,7 +31,7 @@ extract() {      dir="tmp/$(printf "$path" | cut -d '/' -f 2)"      directories="DIRS$(printf "$pack" | cut -d ':' -f 3)"      subtree="$(printf "$pack" | cut -d ':' -f 4)" -    printf -- "- [$name](https://github.com/$path) (" +    output "- [$name](https://github.com/$path) ("      subdirs=""      for subdir in ${!directories}; do @@ -39,7 +46,7 @@ extract() {      done -    printf "${subdirs##, })\n" +    output "${subdirs##, })\n"    done    for pack in $1; do @@ -69,6 +76,22 @@ concat_ftdetect() {    mv tmp/polyglot.vim ftdetect/  } +update_readme() { +  OLD_README="$(cat README.md)" + +  ed README.md <<- EOF +/Language packs ++2kb +/## +'b,-2c +$(printf -- "$OUTPUT") +. +w +q +EOF + +} +  PACKS="    arduino:sudar/vim-arduino-syntax    blade:xsbeats/vim-blade @@ -144,5 +167,6 @@ printf "Downloading packs..."  download "$PACKS"  extract "$PACKS"  concat_ftdetect +update_readme  rm -rf tmp | 
