Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- rem Template-generated program. Please modify it.
- setlocal
- call :init
- set /a "i=0"
- :copy_options
- set "option=%~1"
- if defined option (
- set "args[%i%]=%option%"
- shift
- set /a "i+=1"
- goto copy_options
- )
- set /a "args_count=i"
- set /a "i=0"
- :main_loop
- set /a "j=i + 1"
- call set "option=%%args[%i%]%%"
- call set "value=%%args[%j%]%%"
- set /a "is__h=FALSE"
- if "%option%" == "-h" set /a "is__h=TRUE"
- if "%option%" == "-hlp" set /a "is__h=TRUE"
- if "%option%" == "--help" set /a "is__h=TRUE"
- if %is__h% equ %TRUE% (
- call :_h_handler
- exit /b %SUCCESS_EC%
- )
- set /a "is__v=FALSE"
- if "%option%" == "-v" set /a "is__v=TRUE"
- if "%option%" == "-vrsn" set /a "is__v=TRUE"
- if "%option%" == "--version" set /a "is__v=TRUE"
- if %is__v% equ %TRUE% (
- call :_v_handler
- exit /b %SUCCESS_EC%
- )
- set /a "is__f=FALSE"
- if "%option%" == "-f" set /a "is__f=TRUE"
- if "%option%" == "-fl" set /a "is__f=TRUE"
- if "%option%" == "--file" set /a "is__f=TRUE"
- if %is__f% equ %TRUE% (
- call :_f_handler
- exit /b %SUCCESS_EC%
- )
- exit /b %SUCCESS_EC%
- :init
- set /a "SUCCESS_EC=0"
- set /a "UNSPECIFIED_FAIL_EC=1"
- set /a "TRUE=0"
- set /a "FALSE=1"
- exit /b %SUCCESS_EC%
- :_h_handler
- echo _h_handler executed. Please change this template-generated code.
- exit /b %SUCCESS_EC%
- :_v_handler
- echo _v_handler executed. Please change this template-generated code.
- exit /b %SUCCESS_EC%
- :_f_handler
- echo _f_handler executed. Please change this template-generated code.
- exit /b %SUCCESS_EC%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement