代码拉取完成,页面将自动刷新
setlocal
if not defined RIME_ROOT set RIME_ROOT=%CD%
rem for GitHub pull request #1, git checkout 1/merge
set clone_options=^
--config "remote.origin.fetch=+refs/pull/*:refs/remotes/origin/*" ^
--depth 1 ^
--no-single-branch
echo RIME_PLUGINS=%RIME_PLUGINS% > version-info.txt
echo librime >> version-info.txt
git describe --always >> version-info.txt
if defined RIME_PLUGINS (
for %%s in (%RIME_PLUGINS%) do call :install_plugin %%s || exit /b
)
exit /b
:install_plugin
set plugin=%1
echo plugin: %plugin%
for /f "delims=@" %%i in ("%plugin%") do (
set slug=%%i
goto :got_slug
)
:got_slug
if %slug% == %plugin% (
set branch=
) else (
set branch=%plugin:*@=%
)
set plugin_project=%slug:*/=%
set plugin_dir=plugins\%plugin_project:librime-=%
git clone %clone_options% "https://github.com/%slug%.git" %plugin_dir%
if errorlevel 1 exit /b
rem pull request ref doesn't work with git clone --branch
if not [%branch%] == [] (
git -C %plugin_dir% checkout %branch%
if errorlevel 1 exit /b
)
:action_install_plugin
echo %plugin% >> version-info.txt
git -C %plugin_dir% describe --always >> version-info.txt
if exist %plugin_dir%\action-install.bat (
pushd %plugin_dir%
call action-install.bat
if errorlevel 1 exit /b
popd
)
exit /b
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。