comparison update-vendor @ 706:4b30df382167

[update-vendor] smarter pack handling?
author nanaya <me@nanaya.net>
date Sun, 18 Dec 2022 22:23:22 +0900
parents 1e0f578f6752
children 4576f1471f53
comparison
equal deleted inserted replaced
705:500c3e9bf73f 706:4b30df382167
21 ) 21 )
22 } 22 }
23 23
24 _get_pack_github() { 24 _get_pack_github() {
25 ( 25 (
26 mkdir -p "$1" && cd "$1" 26 wget -nv -O - "$3" | unzip -q -
27 wget -nv -O - "$2" | unzip -q - 27 mv "./${1}-${2}" "./${1}"
28 # hopefully only one directory inside
29 _dirname="$(echo *)"
30 mv "./${_dirname}"/* ./
31 mv "./${_dirname}"/.??* ./
32 rmdir "./${_dirname}"
33 ) 28 )
34 } 29 }
35 30
36 _autoloads() { 31 _autoloads() {
37 ( 32 (
78 ( 73 (
79 cd "$(dirname "$0")/vendor/vim-packs" 74 cd "$(dirname "$0")/vendor/vim-packs"
80 75
81 touch empty 76 touch empty
82 rm -rf ./* 77 rm -rf ./*
83 _get_pack_github "srcery-vim" "https://github.com/srcery-colors/srcery-vim/archive/refs/heads/master.zip" 78 _get_pack_github "srcery-vim" "master" "https://github.com/srcery-colors/srcery-vim/archive/refs/heads/master.zip"
84 ) 79 )
85 } 80 }
86 81
87 _autoloads 82 _autoloads
88 _syntaxes 83 _syntaxes