5 REM Set intermediate env vars because the %VAR:x=y% notation below
6 REM (which replaces the string x with the string y in VAR)
7 REM doesn't handle undefined environment variables. This way
8 REM we're always dealing with defined variables in those tests.
9 SET CHK_SERVICE_HOME=_%AWS_CLOUDWATCH_HOME%
10 SET SERVICE_HOME=%AWS_CLOUDWATCH_HOME%
12 if "%CHK_SERVICE_HOME:"=%" == "_" goto SERVICE_HOME_MISSING
14 SET SERVICE_HOME="%SERVICE_HOME:"=%"
17 IF (%1) == () GOTO ARGV_DONE
18 REM Get around strange quoting bug
25 call %SERVICE_HOME%\bin\service.cmd %ARGV%
29 echo AWS_CLOUDWATCH_HOME is not set
35 REM Restore original echo state