diff update-vendor @ 688:17cacf387f7c

Update vendor ...also update scripts to support syntax subdirectories
author nanaya <me@nanaya.pro>
date Fri, 21 Oct 2022 20:17:06 +0900
parents 2febdacae5b4
children 1e0f578f6752
line wrap: on
line diff
--- a/update-vendor	Thu Oct 13 16:16:07 2022 +0900
+++ b/update-vendor	Fri Oct 21 20:17:06 2022 +0900
@@ -12,14 +12,19 @@
 
 
 _get() {
-  wget -nv "$1"
+  (
+      if [ -n "${2:-}" ]; then
+        mkdir -p "$2" && cd "$2"
+      fi
+      wget -nv "$1"
+  )
 }
 
 
 (
   cd "$(dirname "$0")/vendor/vim-autoload"
 
-  rm -f *.vim
+  rm -f ./*.vim ./*/*.vim
   _get "https://raw.githubusercontent.com/tpope/vim-pathogen/master/autoload/pathogen.vim"
 )
 
@@ -27,7 +32,7 @@
 (
   cd "$(dirname "$0")/vendor/vim-syntax"
 
-  rm -f *.vim
+  rm -f ./*.vim ./*/*.vim
   _get https://hg.nginx.org/nginx/raw-file/tip/contrib/vim/syntax/nginx.vim
   _get https://raw.githubusercontent.com/jwalton512/vim-blade/master/syntax/blade.vim
   _get https://raw.githubusercontent.com/kchmck/vim-coffee-script/master/syntax/coffee.vim
@@ -40,14 +45,14 @@
   _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/ruby.vim
   _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/scss.vim
   _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/typescript.vim
-  _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/typescriptcommon.vim
+  _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/shared/typescriptcommon.vim shared
   _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/typescriptreact.vim
 )
 
 (
   cd "$(dirname "$0")/vendor/vim-colors"
 
-  rm -f *.vim
+  rm -f ./*.vim ./*/*.vim
   _get https://raw.githubusercontent.com/NLKNguyen/papercolor-theme/master/colors/PaperColor.vim
   _get https://raw.githubusercontent.com/srcery-colors/srcery-vim/master/colors/srcery.vim
   _get https://raw.githubusercontent.com/tomasiser/vim-code-dark/master/colors/codedark.vim