bat脚本判断vscode插件是否安装

直接上干货脚本:

call code --list-extensions > "%HomePath%\.gba-ncti\.cache\offline-package\installed-extensions.txt"
set "filePath=%HomePath%\.gba-ncti\.cache\offline-package\installed-extensions.txt"
echo "install QsemOS IDE plugins......"


echo "install QsemOS IDE depend plugins......"
set "hasSuccess=none"

for /F "tokens=* delims=" %%a in ('findstr /I "ms-vscode.cpptools-themes" "%filePath%"') do set "hasSuccess=ms-vscode.cpptools-themes"
echo "hasSuccess=%hasSuccess%"
if NOT "%hasSuccess%" == "ms-vscode.cpptools-themes" (
call code --install-extension "%HomePath%\.gba-ncti\.cache\offline-package\dep-plugins\ms-vscode.cpptools-themes-2.0.0.vsix"
) else (
echo "Already exists %hasSuccess%"
)
for /F "tokens=* delims=" %%a in ('findstr /I "ms-vscode-remote.remote-ssh" "%filePath%"') do set "hasSuccess=ms-vscode-remote.remote-ssh"
echo "hasSuccess=%hasSuccess%"
if NOT "%hasSuccess%" == "ms-vscode-remote.remote-ssh" (
call code --install-extension "%HomePath%\.gba-ncti\.cache\offline-package\dep-plugins\ms-vscode-remote.remote-ssh-0.113.1.vsix"
) else (
echo "Already exists %hasSuccess%"
)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值