Advertisement
Guest User

loop

a guest
May 30th, 2013
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. set "args=--print-compilation-commands"
  2. if not "%~1"=="" (
  3. set "copy=%~1"
  4. set "done=0"
  5. if "!copy:~0,2!"=="-l" (
  6. set "libs=!libs! !copy!"
  7. set "done=1"
  8. )
  9. if "!done!"=="0" (
  10. if "!copy:~0,2!"=="-D" (
  11. set "libs=!libs! !copy!"
  12. ) else (
  13. set "args=!args! !copy!"
  14. )
  15. )
  16. )
  17. :commandlineloop
  18. shift /1
  19. if not "%~1"=="" (
  20. set "copy=%~1"
  21. set "done=0"
  22. if "!copy:~0,2!"=="-l" (
  23. set "libs=!libs! !copy!"
  24. set "done=1"
  25. )
  26. if "!done!"=="0" (
  27. if "!copy:~0,2!"=="-D" (
  28. set "libs=!libs! !copy!"
  29. ) else (
  30. set "args=!args! !copy!"
  31. )
  32. )
  33. goto :commandlineloop
  34. )
  35. echo libs: %libs% args: %args%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement