changeset 718:1f8218896f2a

[update-vendor] Fix indents and remove useless touch
author nanaya <me@nanaya.net>
date Mon, 19 Dec 2022 05:46:25 +0900
parents 11cbbaf42768
children bcdf320dabf4
files update-vendor
diffstat 1 files changed, 32 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/update-vendor	Mon Dec 19 05:44:38 2022 +0900
+++ b/update-vendor	Mon Dec 19 05:46:25 2022 +0900
@@ -3,61 +3,59 @@
 set -u
 set -e
 
-
 for _cmd in wget unzip; do
-  if command -v "$_cmd" > /dev/null 2>&1; then :
-  else
-    echo "${_cmd} is required"
-    exit 1
-  fi
+    if command -v "$_cmd" > /dev/null 2>&1; then :
+    else
+        echo "${_cmd} is required"
+        exit 1
+    fi
 done
 
 _get() {
-  (
-      if [ -n "${2:-}" ]; then
+(
+    if [ -n "${2:-}" ]; then
         mkdir -p "$2" && cd "$2"
-      fi
-      wget -nv "$1"
-  )
+    fi
+    wget -nv "$1"
+)
 }
 
 _get_pack_github() {
-  (
+(
     wget -nv -O - "https://github.com/${1}/${2}/archive/refs/heads/${3}.zip" | unzip -q -
     mv "./${2}-${3}" "./${2}"
-  )
+)
 }
 
 _syntaxes() {
 (
-  cd "$(dirname "$0")/vendor/vim-syntax"
+    cd "$(dirname "$0")/vendor/vim-syntax"
 
-  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
-  _get https://raw.githubusercontent.com/slim-template/vim-slim/master/syntax/slim.vim
-  _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/css.vim
-  _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/eruby.vim
-  _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/javascript.vim
-  _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/json.vim
-  _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/less.vim
-  _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/shared/typescriptcommon.vim shared
-  _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/typescriptreact.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
+    _get https://raw.githubusercontent.com/slim-template/vim-slim/master/syntax/slim.vim
+    _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/css.vim
+    _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/eruby.vim
+    _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/javascript.vim
+    _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/json.vim
+    _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/less.vim
+    _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/shared/typescriptcommon.vim shared
+    _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/typescriptreact.vim
 )
 }
 
 _packs() {
 (
-  cd "$(dirname "$0")/vendor/vim-packs"
+    cd "$(dirname "$0")/vendor/vim-packs"
 
-  touch empty
-  rm -rf ./*
-  _get_pack_github "srcery-colors" "srcery-vim" "master"
-  _get_pack_github "ctrlpvim" "ctrlp.vim" "master"
+    rm -rf ./*
+    _get_pack_github "srcery-colors" "srcery-vim" "master"
+    _get_pack_github "ctrlpvim" "ctrlp.vim" "master"
 )
 }