Statistics
| Revision:

root / trunk / scripts / admb / root-admb.bat @ 1442

History | View | Annotate | Download (646 Bytes)

1
@echo off
2
@REM
3
@REM  Copyright 2013 (c) ADMB Foundation
4
@REM
5

    
6
setlocal EnableExtensions EnableDelayedExpansion
7

    
8
for %%a in (%0) do (
9
  set HAS_PATH=%%~$PATH:a
10
  if defined HAS_PATH (
11
    set ADMB_PATH=%%~dp$PATH:a
12
  ) else (
13
    set ADMB_PATH=%%~dpa
14
  )
15
  if exist !ADMB_PATH!bin\admb.cmd (
16
    set ADMB_HOME=!ADMB_PATH:~0,-1!
17
    call "!ADMB_HOME!\bin\admb" %*
18
  ) else (
19
    if exist !ADMB_PATH!build\dist\bin\admb.cmd (
20
      set ADMB_HOME=!ADMB_PATH!build\dist
21
      call "!ADMB_HOME!\bin\admb" %*
22
    ) else (
23
      echo "Error: Unable to find ADMB_HOME\bin\admb.cmd."
24
      goto EOF
25
    )
26
  )
27
  goto EOF
28
)
29
:EOF