anchor.diff:  rem
   rem Usage: makebase <path-to-target-directory>
   
  +setlocal
  +
  +rem Guess CATALINA_HOME if not defined
  +set "CURRENT_DIR=%cd%"
  +if not "%CATALINA_HOME%" == "" goto gotHome
  +set "CATALINA_HOME=%CURRENT_DIR%"
  +if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
  +cd ..
  +set "CATALINA_HOME=%cd%"
  +cd "%CURRENT_DIR%"
  +:gotHome
  +
  +if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
  +echo The CATALINA_HOME environment variable is not defined correctly
  +echo This environment variable is needed to run this program
  +goto EOF
  +:okHome
  +
   rem first arg is the target directory
   set BASE_TGT=%1
   
  
positive.code: )
  
  rem copy conf directory
  robocopy %HOME_DIR%\conf %BASE_TGT%\conf > nul
  
  rem copy setenv.bat if exists
  robocopy %HOME_DIR%\bin %BASE_TGT%\bin setenv.bat > nul
  
  echo Created CATALINA_BASE directory at %BASE_TGT%
  
  
negative.code:     echo Usage: makebase ^<path-to-target-directory^>
      goto :EOF
  )
  
  if exist %BASE_TGT% (
    rem target directory exists
  