-
Notifications
You must be signed in to change notification settings - Fork 32
/
git_sparse_download.bat
45 lines (38 loc) · 1008 Bytes
/
git_sparse_download.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
echo off
if "%~1"=="" goto :help
if "%~1"=="help" goto :help
if "%~1"=="-h" goto :help
if [%~1]== [/?] goto :help
goto :main
:help
echo.
echo Usage:
echo -h, help, /? - print this help
echo The script uses git to download common part + required models
echo It requires a list of model folders as them named in GitHub repo
echo At least one folder has to be added
echo.
echo Example:
echo %~nx0 facedetect_v1
echo.
echo NOTE: The script does not check if there is any mistakes in folders' name!!!
echo.
exit /B
:main
:: Prepare sparse-checkout list
echo caffe_models/image* > sparse-checkout
:loop
if not "%1"=="" (
echo caffe_models/%1 >> sparse-checkout
shift
goto :loop
)
md cnn_models
cd cnn_models
:: it makes .git folder in ./cnn_models
git init
git remote add -t master origin https://github.com/foss-for-synopsys-dwc-arc-processors/synopsys-caffe-models.git
git config core.sparseCheckout true
move ..\sparse-checkout .git\info
git fetch --depth 1
git checkout master