Advertisement
Kitomas

_BUILD.bat

Aug 4th, 2023 (edited)
1,244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.76 KB | None | 0 0
  1. rem _BUILD.bat
  2. @echo off
  3.  
  4. rem probe for admin privileges...
  5. NET SESSION
  6. rem net session will error and change errorlevel
  7. rem to a nonzero value if admin privs aren't present
  8. echo this script requires administrator access!
  9. if not "%ERRORLEVEL%"=="0" goto not_admin
  10. cls
  11.  
  12. rem cd to _BUILD.bat's path, then switch drives
  13. cd %~dp0build
  14. %~d0
  15.  
  16. echo mingw32-make clean:
  17. mingw32-make clean
  18.  
  19. echo mingw32-make all:
  20. mingw32-make all
  21.  
  22. set /p DO_INSTALL=Perform install? (y/n):
  23. rem yeah, i know 4 if statements in a row looks silly
  24. if "%DO_INSTALL%"=="y" goto do_install
  25. if "%DO_INSTALL%"=="Y" goto do_install
  26. if "%DO_INSTALL%"=="yes" goto do_install
  27. if "%DO_INSTALL%"=="Yes" goto do_install
  28. exit
  29.  
  30. :do_install
  31. mingw32-make install
  32.  
  33. cd ..
  34. :not_admin
  35. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement