Revision 1442 trunk/scripts/admb/admb.bat

admb.bat (revision 1442)
16 16
)
17 17

  
18 18
if not defined ADMB_HOME (
19
  for %%a in (%0) do (
20
    set HAS_PATH=%%~$PATH:a
21
    if defined HAS_PATH (
22
      set ADMB_PATH="%%~dp$PATH:a"
23
    ) else (
24
      set ADMB_PATH="%%~dpa"
25
    )
26
    pushd !ADMB_PATH!
19
  set SCRIPT_PATH=%~dp0
20
  if defined SCRIPT_PATH (
21
    pushd !SCRIPT_PATH!
27 22
    pushd ..
28 23
    set ADMB_HOME=!CD!
29 24
    popd
30 25
    popd
26
  ) else (
27
    for %%a in (admb.cmd) do (
28
      set HAS_PATH=%%~dp$PATH:a
29
      if defined HAS_PATH (
30
        pushd !HAS_PATH!
31
        pushd ..
32
        set ADMB_HOME=!CD!
33
        popd
34
        popd
35
      )
36
    )
31 37
  )
32 38
) else (
33 39
  pushd !ADMB_HOME!
......
336 342
echo.&echo Error: Unable to build.
337 343
echo.&echo COMSPEC=%COMSPEC%.
338 344
echo.&echo PATH=%PATH%.
345
echo.&echo ADMB_HOME: !ADMB_HOME!
339 346
goto EOF
340 347
:HELP
341 348
echo Builds AD Model Builder executable or library.

Also available in: Unified diff