-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPrepareDevelopment.bat
More file actions
52 lines (41 loc) · 1.18 KB
/
PrepareDevelopment.bat
File metadata and controls
52 lines (41 loc) · 1.18 KB
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
45
46
47
48
49
50
@echo off
:: NOTE: Using :: for comments is problematic inside (...) blocks, so I'll be using rem
:: See https://stackoverflow.com/questions/12407800/which-comment-style-should-i-use-in-batch-files
setlocal
set THISFOLDER=%~dp0
pushd %THISFOLDER%
if not exist "./temp" (
md temp
)
if not exist "./temp/extra_deps" (
md temp\extra_deps
)
rem My development setup normally has all my personal project repositories in <ROOTFOLDER>\crazygaze\<REPO>,
rem so if a given folder name is found at the same level as AutoWatering, then it's probably the thing to use,
rem and we create a link.
rem If there isn't one, the we clone the repo
rem ** czmicromuc **
if not exist "./temp/extra_deps/czmicromuc" (
if exist "./../czmicromuc" (
rem Link to the already existing repo
mklink /J "./temp/extra_deps/czmicromuc" "../czmicromuc/lib"
) else (
echo ***Cloning czmicromuc***
echo on
git clone https://github.com/ruifig/czmicromuc "./temp/repos/czmicromuc"
rem Link to just the "lib" folder
mklink /J "./temp/extra_deps/czmicromuc" "./temp/repos/czmicromuc/lib"
echo off
)
)
:: Everything ok
endlocal
goto end
:: Error
:error
endlocal
echo ERROR!!
exit /b %errorlevel%
:end
popd
pause