Revision 971

trunk/scripts/admb/admb.bat (revision 971)
10 10
  set "ADMB_HOME="
11 11
)
12 12
for %%a in (%0.bat) do (
13
  set IS_ON_PATH=%%~$PATH:a
14
  if not "!IS_ON_PATH!"=="" (
13
  set HAS_PATH=%%~$PATH:a
14
  if not "!HAS_PATH!"=="" (
15 15
    set ADMB_PATH="%%~dp$PATH:a"
16
    pushd !ADMB_PATH!\..
17
    set ADMB_HOME=!CD!
18
    popd
19 16
  ) else (
20 17
    set ADMB_PATH="%%~dpa"
21
    pushd !ADMB_PATH!\..
22
    set ADMB_HOME=!CD!
23
    popd
24 18
  )
19
  pushd !ADMB_PATH!\..
20
  set ADMB_HOME=!CD!
21
  popd
25 22
)
26 23
set PATH=!ADMB_HOME!\bin;%PATH%
27 24

  
trunk/scripts/admb/root-admb.bat (revision 971)
1
@echo off
2

  
3
setlocal EnableExtensions EnableDelayedExpansion
4

  
5
for %%a in (%0.bat) do (
6
  set HAS_PATH=%%~$PATH:a
7
  if not "!HAS_PATH!"=="" (
8
    set ADMB_PATH="%%~dp$PATH:a"
9
  ) else (
10
    set ADMB_PATH=%%~dpa
11
  )
12
  if exist !ADMB_PATH!build\dist\bin\admb.bat (
13
    set ADMB_HOME=!ADMB_PATH!build\dist
14
  ) else (
15
    pushd !ADMB_PATH!\..
16
    set ADMB_HOME=!CD!
17
    popd
18
  )
19
  call !ADMB_HOME!\bin\admb.bat %*
20
)

Also available in: Unified diff