From 0ed6ba34b353259e823964fef4f394a91c716f8d Mon Sep 17 00:00:00 2001 From: rabix Date: Sat, 5 Mar 2022 14:25:10 +0800 Subject: [PATCH] add gitme and git --- bin/choco.cmd | 6 ++++-- bin/git.cmd | 4 ++++ bin/gitme.cmd | 6 ++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 bin/git.cmd create mode 100644 bin/gitme.cmd diff --git a/bin/choco.cmd b/bin/choco.cmd index 165ebc5..6f8ceb8 100644 --- a/bin/choco.cmd +++ b/bin/choco.cmd @@ -1,5 +1,7 @@ @echo off where choco.exe >nul 2>nul -if errorlevel 1 powershell -c "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1').Replace('if (Test-ChocolateyInstalled)', 'if ($false)'))" -call v-choco-refreshenv +if errorlevel 1 ( + powershell -c "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1').Replace('if (Test-ChocolateyInstalled)', 'if ($false)'))" + call v-choco-refreshenv +) choco.exe %* \ No newline at end of file diff --git a/bin/git.cmd b/bin/git.cmd new file mode 100644 index 0000000..2635ddd --- /dev/null +++ b/bin/git.cmd @@ -0,0 +1,4 @@ +@echo off +where git.exe 2>nul >nul +if errorlevel 1 call choco install git & call %~dp0\v-choco-refreshenv +git.exe %* \ No newline at end of file diff --git a/bin/gitme.cmd b/bin/gitme.cmd new file mode 100644 index 0000000..bae3edc --- /dev/null +++ b/bin/gitme.cmd @@ -0,0 +1,6 @@ +@echo off +if "%1"=="" ( + echo gitme username/reponame + exit /b +) +git clone https://gitme.fun/%1 . && if exist vid-init-module.cmd call vid-init-module.cmd \ No newline at end of file