テキストファイルに書かれているURLを次々とgit cloneします。
使い方
以下に記述している「テキストファイル(list.txt)」と「次々とgit cloneするBATファイル(setup.bat)」を同一フォルダに格納し、「次々とgit cloneするBATファイル(setup.bat)」を実行します。
D:\Git-reposへ、次々にgit cloneされます。
テキストファイル(記述例)
[list.txt]
git@github.com:kunst1080/AnubisGG.git
https://github.com/freebsd/freebsd.git
次々とgit cloneするBATファイル
[setup.bat]
@echo off
set LIST=%~dp0list.txt
set DESTDIR=D:\Git-repos
set GIT="C:\Program Files (x86)\Git\bin\git.exe"
REM make directory
if not exist %DESTDIR% mkdir %DESTDIR%
REM Git clone
cd /d %DESTDIR%
for /f "usebackq tokens=1,2" %%a in (`type "%LIST%"`) do (
echo git clone %%a %%b
%GIT% clone %%a %%b
echo.
)
※環境に応じて、環境変数「DESTDIR」と「GIT」の値は書き換えて下さい。