Want more features on Pastebin? Sign Up, it's FREE!
Guest

for loop

By: a guest on May 30th, 2013  |  syntax: None  |  size: 0.72 KB  |  views: 28  |  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. 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. )
clone this paste RAW Paste Data