Statistics
| Revision:

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

History | View | Annotate | Download (724 Bytes)

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

    
6
setlocal EnableExtensions EnableDelayedExpansion
7

    
8
set SCRIPT_PATH=%~dp0
9
if not defined SCRIPT_PATH (
10
  for %%a in (%0) do (
11
    set SCRIPT_PATH=%%~dp$PATH:a
12
  )
13
) 
14
if not defined SCRIPT_PATH (
15
  echo "SCRIPT_PATH: !SCRIPT_PATH!"
16
  goto ERROR
17
)
18
pushd !SCRIPT_PATH!
19
set ADMB_PATH=!CD!
20
popd
21
if exist !ADMB_PATH!\bin\admb.cmd (
22
  set ADMB_HOME=!ADMB_PATH!
23
) else (
24
  if exist !ADMB_PATH!\build\dist\bin\admb.cmd (
25
    set ADMB_HOME=!ADMB_PATH!\build\dist
26
  )
27
)
28
if not defined ADMB_HOME (
29
  echo "ADMB_HOME: !ADMB_HOME!"
30
  goto ERROR
31
)
32
call "!ADMB_HOME!\bin\admb" %*
33
goto EOF
34
:ERROR
35
echo Error: Unable to find 'bin\admb.cmd'.
36
:EOF