-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStart.bat
executable file
·53 lines (43 loc) · 1.21 KB
/
Start.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
45
46
47
48
49
50
51
52
53
@echo off
echo Checking for at least one deck...
for /d %%i in (.\Assets\Decks\*) do (
set "deckFound=true"
goto :found
)
echo Zero decks found, please provide at least one deck.
exit /b
:found
echo.
echo Checking Deck Contents...
echo.
for /d %%i in (.\Assets\Decks\*) do (
set "dir=%%i"
set "deckName=%%~ni"
echo Checking for DeckAttributes file in %deckName%
if not exist "%dir%\DeckAttributes.json" (
echo Missing DeckAttributes.json in %deckName%
exit /b
)
echo.
echo Checking for Cards directory in %deckName%
if not exist "%dir%\Cards" (
echo Missing Cards folder in %deckName%
exit /b
)
echo.
echo Checking for at least one card in Card directory.
set "cardFound=false"
for %%f in (%dir%\Cards\*.json) do (
set "cardFound=true"
goto :cardFound
)
echo Zero (potential) cards found in %deckName%'s Card Directory
exit /b
:cardFound
echo.
echo Checking for Abilities directory in %deckName%
if not exist "%dir%\Abilities" (
echo Missing Abilities folder in %deckName%
echo Continuing, assuming no abilities are needed.
)
)