Mercurial > ec-dotfiles
annotate update-vendor @ 705:500c3e9bf73f
[setup] add missing done message
author | nanaya <me@nanaya.net> |
---|---|
date | Sun, 18 Dec 2022 20:46:51 +0900 |
parents | 1e0f578f6752 |
children | 4b30df382167 |
rev | line source |
---|---|
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
1 #!/bin/sh |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
2 |
572 | 3 set -u |
4 set -e | |
5 | |
6 | |
704
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
7 for _cmd in wget unzip; do |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
8 if command -v "$_cmd" > /dev/null 2>&1; then : |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
9 else |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
10 echo "${_cmd} is required" |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
11 exit 1 |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
12 fi |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
13 done |
572 | 14 |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
15 _get() { |
688 | 16 ( |
17 if [ -n "${2:-}" ]; then | |
18 mkdir -p "$2" && cd "$2" | |
19 fi | |
20 wget -nv "$1" | |
21 ) | |
508
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
22 } |
bbcffc594d1e
Vendor what should be vendored and add some more.
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
23 |
704
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
24 _get_pack_github() { |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
25 ( |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
26 mkdir -p "$1" && cd "$1" |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
27 wget -nv -O - "$2" | unzip -q - |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
28 # hopefully only one directory inside |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
29 _dirname="$(echo *)" |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
30 mv "./${_dirname}"/* ./ |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
31 mv "./${_dirname}"/.??* ./ |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
32 rmdir "./${_dirname}" |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
33 ) |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
34 } |
572 | 35 |
704
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
36 _autoloads() { |
572 | 37 ( |
38 cd "$(dirname "$0")/vendor/vim-autoload" | |
39 | |
688 | 40 rm -f ./*.vim ./*/*.vim |
572 | 41 _get "https://raw.githubusercontent.com/tpope/vim-pathogen/master/autoload/pathogen.vim" |
42 ) | |
704
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
43 } |
572 | 44 |
704
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
45 _syntaxes() { |
572 | 46 ( |
47 cd "$(dirname "$0")/vendor/vim-syntax" | |
48 | |
688 | 49 rm -f ./*.vim ./*/*.vim |
623 | 50 _get https://hg.nginx.org/nginx/raw-file/tip/contrib/vim/syntax/nginx.vim |
632
c950f0ef2268
Apparently better use githubusercontent?
nanaya <me@nanaya.pro>
parents:
631
diff
changeset
|
51 _get https://raw.githubusercontent.com/jwalton512/vim-blade/master/syntax/blade.vim |
c950f0ef2268
Apparently better use githubusercontent?
nanaya <me@nanaya.pro>
parents:
631
diff
changeset
|
52 _get https://raw.githubusercontent.com/kchmck/vim-coffee-script/master/syntax/coffee.vim |
c950f0ef2268
Apparently better use githubusercontent?
nanaya <me@nanaya.pro>
parents:
631
diff
changeset
|
53 _get https://raw.githubusercontent.com/slim-template/vim-slim/master/syntax/slim.vim |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
632
diff
changeset
|
54 _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/css.vim |
632
c950f0ef2268
Apparently better use githubusercontent?
nanaya <me@nanaya.pro>
parents:
631
diff
changeset
|
55 _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/eruby.vim |
634
ced2ee9efd9f
Update various syntaxes to the ones in vim repo
nanaya <me@nanaya.pro>
parents:
632
diff
changeset
|
56 _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/javascript.vim |
632
c950f0ef2268
Apparently better use githubusercontent?
nanaya <me@nanaya.pro>
parents:
631
diff
changeset
|
57 _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/json.vim |
c950f0ef2268
Apparently better use githubusercontent?
nanaya <me@nanaya.pro>
parents:
631
diff
changeset
|
58 _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/less.vim |
c950f0ef2268
Apparently better use githubusercontent?
nanaya <me@nanaya.pro>
parents:
631
diff
changeset
|
59 _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/ruby.vim |
c950f0ef2268
Apparently better use githubusercontent?
nanaya <me@nanaya.pro>
parents:
631
diff
changeset
|
60 _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/scss.vim |
672 | 61 _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/typescript.vim |
688 | 62 _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/shared/typescriptcommon.vim shared |
672 | 63 _get https://raw.githubusercontent.com/vim/vim/master/runtime/syntax/typescriptreact.vim |
572 | 64 ) |
704
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
65 } |
662
f280738a90a6
[vim] vendor theme and add some more
nanaya <me@nanaya.pro>
parents:
660
diff
changeset
|
66 |
704
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
67 _colors() { |
662
f280738a90a6
[vim] vendor theme and add some more
nanaya <me@nanaya.pro>
parents:
660
diff
changeset
|
68 ( |
f280738a90a6
[vim] vendor theme and add some more
nanaya <me@nanaya.pro>
parents:
660
diff
changeset
|
69 cd "$(dirname "$0")/vendor/vim-colors" |
f280738a90a6
[vim] vendor theme and add some more
nanaya <me@nanaya.pro>
parents:
660
diff
changeset
|
70 |
688 | 71 rm -f ./*.vim ./*/*.vim |
662
f280738a90a6
[vim] vendor theme and add some more
nanaya <me@nanaya.pro>
parents:
660
diff
changeset
|
72 _get https://raw.githubusercontent.com/NLKNguyen/papercolor-theme/master/colors/PaperColor.vim |
f280738a90a6
[vim] vendor theme and add some more
nanaya <me@nanaya.pro>
parents:
660
diff
changeset
|
73 _get https://raw.githubusercontent.com/tomasiser/vim-code-dark/master/colors/codedark.vim |
f280738a90a6
[vim] vendor theme and add some more
nanaya <me@nanaya.pro>
parents:
660
diff
changeset
|
74 ) |
704
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
75 } |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
76 |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
77 _packs() { |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
78 ( |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
79 cd "$(dirname "$0")/vendor/vim-packs" |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
80 |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
81 touch empty |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
82 rm -rf ./* |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
83 _get_pack_github "srcery-vim" "https://github.com/srcery-colors/srcery-vim/archive/refs/heads/master.zip" |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
84 ) |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
85 } |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
86 |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
87 _autoloads |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
88 _syntaxes |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
89 _colors |
1e0f578f6752
Update vendor and add support for vim packs
nanaya <me@nanaya.net>
parents:
688
diff
changeset
|
90 _packs |