Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rem _BUILD.bat
- @echo off
- rem probe for admin privileges...
- NET SESSION
- rem net session will error and change errorlevel
- rem to a nonzero value if admin privs aren't present
- echo this script requires administrator access!
- if not "%ERRORLEVEL%"=="0" goto not_admin
- cls
- rem cd to _BUILD.bat's path, then switch drives
- cd %~dp0build
- %~d0
- echo mingw32-make clean:
- mingw32-make clean
- echo mingw32-make all:
- mingw32-make all
- set /p DO_INSTALL=Perform install? (y/n):
- rem yeah, i know 4 if statements in a row looks silly
- if "%DO_INSTALL%"=="y" goto do_install
- if "%DO_INSTALL%"=="Y" goto do_install
- if "%DO_INSTALL%"=="yes" goto do_install
- if "%DO_INSTALL%"=="Yes" goto do_install
- exit
- :do_install
- mingw32-make install
- cd ..
- :not_admin
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement