1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 02:20:03 +08:00
SpaceVim/.ci/detach_plugin.sh

294 lines
11 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
_detact () {
cp -f ../../$1 $1
}
_detact_bundle () {
cp -f ../../bundle/$1/$2 $2
}
_checkdir () {
if [[ ! -d "$1" ]]; then
mkdir -p $1
fi
}
2019-09-12 13:51:44 +08:00
_default_readme () {
cat <<EOT > README.md
# $1
> $2
This plugin is automatically detach from [SpaceVim](https://github.com/SpaceVim/SpaceVim/). you can use it without SpaceVim.
EOT
}
main () {
case "$1" in
flygrep)
git clone https://github.com/wsdjeg/FlyGrep.vim.git detach/$1
cd detach/$1
_checkdir syntax/
_checkdir autoload/SpaceVim/api
_checkdir autoload/SpaceVim/api/vim
2019-05-27 20:15:30 +08:00
_checkdir autoload/SpaceVim/api/neovim
2018-05-25 21:20:49 +08:00
_checkdir autoload/SpaceVim/api/data
_checkdir autoload/SpaceVim/mapping
_checkdir autoload/SpaceVim/plugins
_detact autoload/SpaceVim/plugins/flygrep.vim
_detact autoload/SpaceVim/api.vim
_detact autoload/SpaceVim/api/logger.vim
_detact autoload/SpaceVim/api/vim/buffer.vim
_detact autoload/SpaceVim/api/vim/regex.vim
_detact autoload/SpaceVim/api/vim/compatible.vim
_detact autoload/SpaceVim/api/vim/floating.vim
_detact autoload/SpaceVim/api/vim/highlight.vim
_detact autoload/SpaceVim/api/vim/statusline.vim
_detact autoload/SpaceVim/api/vim/window.vim
_detact autoload/SpaceVim/api/neovim/floating.vim
_detact autoload/SpaceVim/api/data/dict.vim
_detact autoload/SpaceVim/api/data/list.vim
_detact autoload/SpaceVim/api/data/json.vim
_detact autoload/SpaceVim/api/data/string.vim
_detact autoload/SpaceVim/api/prompt.vim
_detact autoload/SpaceVim/api/job.vim
_detact autoload/SpaceVim/api/vim.vim
_detact autoload/SpaceVim/api/file.vim
_detact autoload/SpaceVim/api/system.vim
_detact autoload/SpaceVim/api/time.vim
_detact autoload/SpaceVim/mapping/search.vim
_detact autoload/SpaceVim/logger.vim
_detact syntax/SpaceVimFlyGrep.vim
2020-10-11 23:33:16 +08:00
_default_readme "FlyGrep.vim" "Grep on the fly in Vim/Neovim"
_detact LICENSE
2020-10-11 22:19:13 +08:00
_checkdir plugin
cat <<EOT > plugin/FlyGrep.vim
"=============================================================================
" FlyGrep.vim --- Fly grep in vim
" Copyright (c) 2016-2017 Shidong Wang & Contributors
2022-03-27 13:38:54 +08:00
" Author: Shidong Wang < wsdjeg@outlook.com >
2020-10-11 22:19:13 +08:00
" URL: https://github.com/wsdjeg/FlyGrep.vim
" License: MIT license
"=============================================================================
""
" @section Introduction, intro
" @stylized FlyGrep
" @library
" @order intro version dicts functions exceptions layers api faq
" Fly grep in vim, written in pure vim script for MacVim, gvim and vim version
" 8.0+.
"
""
" @section CONFIGURATION, config
" FlyGrep has strong default options, but you can also change the option
" yourself.
""
" FlyGrep will start to searching code after a delay, the default value is
" 500ms.
2020-10-17 12:33:16 +08:00
let g:FlyGrep_input_delay = get(g:, 'FlyGrep_input_delay', 500)
2020-10-11 22:19:13 +08:00
""
" A list of searching tools will be userd.
2020-10-17 12:33:16 +08:00
let g:FlyGrep_search_tools = get(g:, 'FlyGrep_search_tools', ['ag', 'rg', 'grep', 'pt', 'ack'])
2020-10-11 22:19:13 +08:00
2020-10-17 12:33:16 +08:00
let g:spacevim_data_dir = get(g:, 'spacevim_data_dir', '~/.cache')
2020-10-11 22:19:13 +08:00
""
" Enable FlyGrep statusline
2020-10-17 12:33:16 +08:00
let g:FlyGrep_enable_statusline = get(g:, 'FlyGrep_enable_statusline', 1)
2020-10-11 22:19:13 +08:00
""
" Set FlyGrep default command prompt
2020-10-17 12:33:16 +08:00
let g:spacevim_commandline_prompt = get(g:, 'spacevim_commandline_prompt', '➭')
2020-10-11 22:19:13 +08:00
command! -nargs=0 FlyGrep call FlyGrep#open({})
EOT
git add .
2019-07-09 23:14:35 +08:00
git config user.email "wsdjeg@qq.com"
git config user.name "SpaceVimBot"
git commit -m "Auto Update"
git remote add wsdjeg_flygrep https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/FlyGrep.vim.git
git push wsdjeg_flygrep master
cd -
rm -rf detach/$1
exit 0
;;
dein-ui)
git clone https://github.com/wsdjeg/dein-ui.vim.git detach/$1
cd detach/$1
2018-12-16 22:31:40 +08:00
_checkdir syntax/
_checkdir autoload/SpaceVim/api
2018-05-01 21:54:49 +08:00
_checkdir autoload/SpaceVim/api/data
_checkdir autoload/SpaceVim/api/vim
_checkdir autoload/SpaceVim/mapping
_checkdir autoload/SpaceVim/plugins
_detact autoload/SpaceVim/plugins/manager.vim
_detact autoload/SpaceVim/api.vim
_detact autoload/SpaceVim/commands.vim
_detact autoload/SpaceVim/logger.vim
_detact autoload/SpaceVim/api/job.vim
_detact autoload/SpaceVim/api/system.vim
_detact autoload/SpaceVim/api/data/list.vim
_detact autoload/SpaceVim/api/vim/compatible.vim
_detact syntax/SpaceVimPlugManager.vim
_detact LICENSE
git add .
2019-07-09 23:14:35 +08:00
git config user.email "wsdjeg@qq.com"
git config user.name "SpaceVimBot"
git commit -m "Auto Update"
2018-05-01 21:54:49 +08:00
git remote add wsdjeg_dein_ui https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/dein-ui.vim.git
git push wsdjeg_dein_ui master
cd -
rm -rf detach/$1
exit 0
;;
2019-09-12 13:51:44 +08:00
iedit)
git clone https://github.com/wsdjeg/iedit.vim.git detach/$1
cd detach/$1
_checkdir autoload/SpaceVim/api/vim
_checkdir autoload/SpaceVim/api/data
_checkdir autoload/SpaceVim/plugins
_detact autoload/SpaceVim/api.vim
_detact autoload/SpaceVim/api/vim/compatible.vim
_detact autoload/SpaceVim/api/vim/highlight.vim
_detact autoload/SpaceVim/api/data/string.vim
_detact autoload/SpaceVim/plugins/iedit.vim
2019-09-12 13:51:44 +08:00
_checkdir autoload/plugin
cat <<EOT > autoload/plugin/iedit.vim
"=============================================================================
" iedit.vim --- multiple cursor support for neovim and vim
2021-11-13 16:37:24 +08:00
" Copyright (c) 2016-2021 Shidong Wang & Contributors
2022-03-27 13:38:54 +08:00
" Author: Shidong Wang < wsdjeg@outlook.com >
2019-09-12 13:51:44 +08:00
" URL: https://github.com/wsdjeg/iedit.vim
" License: MIT license
"=============================================================================
""
" @section Introduction, intro
" @stylized iedit.vim
" @library
" @order intro version dicts functions exceptions layers api faq
" multiple cursor in vim, written in pure vim script for MacVim, gvim and vim version
" 8.0+.
"
command! -nargs=0 Iedit call SpaceVim#plugins#iedit#start()
EOT
_detact LICENSE
2019-09-12 13:51:44 +08:00
_default_readme "iedit.vim" "multiple cussor support for Vim/Neovim"
git add .
git config user.email "wsdjeg@qq.com"
git config user.name "SpaceVimBot"
git commit -m "Auto Update"
git remote add wsdjeg_vim_todo https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/iedit.vim.git
git push wsdjeg_vim_todo master
cd -
rm -rf detach/$1
exit 0
;;
2019-07-11 19:00:59 +08:00
vim-todo)
2019-07-11 22:03:07 +08:00
git clone https://github.com/wsdjeg/vim-todo.git detach/$1
2019-07-11 19:00:59 +08:00
cd detach/$1
_checkdir syntax/
_detact syntax/SpaceVimTodoManager.vim
2019-07-11 19:00:59 +08:00
_checkdir autoload/SpaceVim/api/vim
2019-07-12 08:54:13 +08:00
_checkdir autoload/SpaceVim/api/data
2019-07-11 19:00:59 +08:00
_checkdir autoload/SpaceVim/plugins
_checkdir autoload/SpaceVim/mapping
_detact autoload/SpaceVim/api.vim
_detact autoload/SpaceVim/api/logger.vim
_detact autoload/SpaceVim/api/job.vim
_detact autoload/SpaceVim/api/system.vim
_detact autoload/SpaceVim/api/data/string.vim
_detact autoload/SpaceVim/api/file.vim
_detact autoload/SpaceVim/api/vim/buffer.vim
_detact autoload/SpaceVim/api/vim/regex.vim
_detact autoload/SpaceVim/api/vim/compatible.vim
_detact autoload/SpaceVim/logger.vim
_detact autoload/SpaceVim/mapping/search.vim
_detact autoload/SpaceVim/plugins/todo.vim
2020-10-15 22:41:48 +08:00
_checkdir plugin
cat <<EOT > plugin/todo.vim
"=============================================================================
" todo.vim --- todo manager for SpaceVim
2022-02-03 17:24:51 +08:00
" Copyright (c) 2016-2022 Wang Shidong & Contributors
2022-03-27 13:38:54 +08:00
" Author: Wang Shidong < wsdjeg@outlook.com >
2020-10-15 22:41:48 +08:00
" URL: https://spacevim.org
" License: GPLv3
"=============================================================================
command! OpenTodo call todo#open()
EOT
_detact LICENSE
2019-07-11 19:00:59 +08:00
git add .
git config user.email "wsdjeg@qq.com"
git config user.name "SpaceVimBot"
git commit -m "Auto Update"
2019-07-11 22:03:07 +08:00
git remote add wsdjeg_vim_todo https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/vim-todo.git
2019-07-11 19:00:59 +08:00
git push wsdjeg_vim_todo master
cd -
rm -rf detach/$1
exit 0
;;
vim-chat)
git clone https://github.com/wsdjeg/vim-chat.git detach/$1
cd detach/$1
_checkdir syntax/
_checkdir doc/
_detact autoload/SpaceVim/api.vim
_detact autoload/SpaceVim/api/job.vim
_detact LICENSE
_detact_bundle vim-chat autoload/chat.vim
_detact_bundle vim-chat autoload/chat/gitter.vim
_detact_bundle vim-chat autoload/chat/logger.vim
_detact_bundle vim-chat autoload/chat/notify.vim
_detact_bundle vim-chat autoload/chat/qq.vim
_detact_bundle vim-chat autoload/chat/weixin.vim
_detact_bundle vim-chat doc/vim-chat.txt
_detact_bundle vim-chat syntax/vimchat.vim
_detact_bundle vim-chat addon-info.json
_detact_bundle vim-chat README.md
git add .
git config user.email "wsdjeg@qq.com"
git config user.name "SpaceVimBot"
git commit -m "Auto Update"
git remote add wsdjeg_vim_chat https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/vim-chat.git
git push wsdjeg_vim_chat master
cd -
rm -rf detach/$1
exit 0
;;
2020-09-22 23:11:37 +08:00
scrollbar.vim)
git clone https://github.com/wsdjeg/scrollbar.vim.git detach/$1
cd detach/$1
_checkdir autoload/SpaceVim/api/
_checkdir autoload/SpaceVim/api/vim
_detact autoload/SpaceVim/api.vim
_detact autoload/SpaceVim/api/vim.vim
_detact autoload/SpaceVim/api/vim/buffer.vim
_detact autoload/SpaceVim/api/vim/window.vim
_checkdir autoload/SpaceVim/plugins/
_detact autoload/SpaceVim/plugins/scrollbar.vim
_detact LICENSE
2020-09-22 23:11:37 +08:00
_default_readme "scrollbar.vim" "floating scrollbar support for neovim/vim[wip]"
git add .
git config user.email "wsdjeg@qq.com"
git config user.name "SpaceVimBot"
git commit -m "Auto Update"
git remote add wsdjeg_scrollbar https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/scrollbar.vim.git
git push wsdjeg_scrollbar master
cd -
rm -rf detach/$1
exit 0
;;
spacevim-theme)
exit 0
esac
}
main $@