This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

loop

By: a guest on May 30th, 2013  |  syntax: None  |  size: 0.62 KB  |  views: 41  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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%
clone this paste RAW Paste Data