forked from Darkened5ky/Wind-Waker-Item-and-Map-Tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update.bat
executable file
·44 lines (34 loc) · 1.02 KB
/
update.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
:: This batch script will zip up the contents of the folder its in and drop it in the pack folder
:: Handy for doing releases
cd %~dp0
set packname=Wind-Waker-Item-and-Map-Tracker-Darkened5ky.zip
set udd=%USERPROFILE%\Documents\EmoTracker\packs\%packname%
set udo=%USERPROFILE%\OneDrive\Documents\EmoTracker\packs\%packname%
set udl=%udd% %udo%
set runfail=0
set itemlist=0
echo .
::Calls all locations and sees if a file exists
(for %%a in (%udl%) do (
(set /a itemlist=itemlist+1)
(if exist %%a (
(echo %%a located.)
(del %%a 2>NUL)
("C:\Program Files\7-Zip\7z.exe" a %%a -xr!*.bat -xr!.git* -xr!*.git -xr!*/unused/*)
(echo %%a replaced.)
) else (
(set /a runfail=runfail+1)
(echo .)
))
))
::If there is such a case where the tracker does not exist
echo .
if %runfail% GEQ %itemlist% (
(del %udd% 2>NUL)
("C:\Program Files\7-Zip\7z.exe" a %udd% -x!*.bat -x!.git* -x!*.git -x!.git/*)
) else (
echo .
)
::Test
"C:/ProgramData/Microsoft/Windows/Start Menu/Programs/EmoTracker/EmoTracker.lnk"