Advertisement
Guest User

for loop

a guest
May 30th, 2013
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. for %%i in (%args%) do (
  2. set "recognized=0"
  3. if "%%i"=="--help" (
  4. set "recognized=1"
  5. echo buildify version 2013-dev
  6. echo Usage:
  7. echo --"buildify [options]"
  8. echo Possible options:
  9. echo -bv : Uses a higher level of verbosity
  10. echo --help : Prints this help message and exits
  11. exit /b 0
  12. )
  13. if "%%i"=="-bv" (
  14. set "verbose=1"
  15. set "recognized=1"
  16. )
  17. REM so use if defined %verbose%
  18. set "print=0"
  19. if "%%i"=="--print-compilation-commands" (
  20. set "print=1"
  21. set "recognized=1"
  22. )
  23. if "%%i"=="-pcc" (
  24. set "print=1"
  25. set "recognized=1"
  26. )
  27. if "!print!"=="1" set "prtcmpcmds=1"
  28. REM so use if defined %prtcmpcmds%
  29. if "!recognized!"=="0" echo Command-line argument %%i not recognized^^!
  30. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement