-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.bat
19 lines (15 loc) · 827 Bytes
/
build.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@echo off
setlocal
@REM Read the version details from the module.prop file
for /f "tokens=2 delims=<> " %%a in ('find "version=Version" ^< "module.prop" ') do set version=%%a
echo ^>^> Creating zip file
if exist "C:\Program Files\7-Zip\7z.exe" (
"C:\Program Files\7-Zip\7z.exe" a -tzip "Systemless-Hosts v%version%.zip" * -x!.git -x!.gitattributes -x!hosts_stock -x!build.bat -x!README.md
) else if exist "C:\Program Files (x86)\7-Zip\7z.exe" (
"C:\Tools\7z.exe" a -tzip "Systemlless-Hosts v%version%.zip" * -x!.git -x!.gitattributes -x!hosts_stock -x!build.bat -x!README.md
) else (
echo ERROR^: 7zip executable not found! Please install it from https://www.7-zip.org/download.html
exit /b 1
)
echo.
echo ^>^> Done! You can find the module zip file in the current directory - '%CD%\Systemless-Hosts v%version%.zip'