Changeset 15354


Ignore:
Timestamp:
2008-05-07T14:24:18+12:00 (16 years ago)
Author:
oranfry
Message:

In gli.bat and gli4gs3.bat, use the temp directory speicified in the TMP environment variable for all temp files

Location:
gli/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/gli.bat

    r15199 r15354  
    101101
    102102    :: Check if Perl is on the search path
    103     echo %PATH%| winutil\which.exe perl.exe | winutil\setvar.exe PERLPATH > setperl.bat
    104     call setperl.bat
    105     del setperl.bat
     103    echo %PATH%| winutil\which.exe perl.exe | winutil\setvar.exe PERLPATH > %TMP%\setperl.bat
     104    call %TMP%\setperl.bat
     105    del %TMP%\setperl.bat
    106106    if not "%PERLPATH%" == "" goto testPerl
    107107
     
    110110
    111111    :: Still haven't found anything, so try looking in the registry (gulp!)
    112     type nul > perl.reg
    113     regedit /E perl.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Perl"
    114     type perl.reg > perl.txt
    115     del perl.reg
    116 
    117     winutil\findperl.exe perl.txt | winutil\setvar.exe PERLPATH > setperl.bat
    118     del perl.txt
    119     call setperl.bat
    120     del setperl.bat
     112    type nul > %TMP%\perl.reg
     113    regedit /E %TMP%\perl.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Perl"
     114    type %TMP%\perl.reg > %TMP%\perl.txt
     115    del %TMP%\perl.reg
     116
     117    winutil\findperl.exe %TMP%\perl.txt | winutil\setvar.exe PERLPATH > %TMP%\setperl.bat
     118    del %TMP%\perl.txt
     119    call %TMP%\setperl.bat
     120    del %TMP%\setperl.bat
    121121
    122122    :: If nothing was found in the registry, we're stuck
     
    174174
    175175    :: Check if Java is on the search path
    176     echo %PATH%| winutil\which.exe java.exe | winutil\setvar.exe JAVAPATH > setjava.bat
    177     call setjava.bat
    178     del setjava.bat
     176    echo %PATH%| winutil\which.exe java.exe | winutil\setvar.exe JAVAPATH > %TMP%\setjava.bat
     177    call %TMP%\setjava.bat
     178    del %TMP%\setjava.bat
    179179    if not "%JAVAPATH%" == "" goto testJava
    180180
    181181    :: Still haven't found anything, so try looking in the registry (gulp!)
    182     type nul > jdk.reg
    183     regedit /E jdk.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit"
    184     type jdk.reg > jdk.txt
    185     del jdk.reg
    186     type nul > jre.reg
    187     regedit /E jre.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment"
    188     type jre.reg > jre.txt
    189     del jre.reg
    190 
    191     winutil\findjava.exe jdk.txt jre.txt | winutil\setvar.exe JAVAPATH > setjava.bat
    192     del jdk.txt
    193     del jre.txt
    194     call setjava.bat
    195     del setjava.bat
     182    type nul > %TMP%\jdk.reg
     183    regedit /E %TMP%\jdk.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit"
     184    type %TMP%\jdk.reg > %TMP%\jdk.txt
     185    del %TMP%\jdk.reg
     186    type nul > %TMP%\jre.reg
     187    regedit /E %TMP%\jre.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment"
     188    type %TMP%\jre.reg > %TMP%\jre.txt
     189    del %TMP%\jre.reg
     190
     191    winutil\findjava.exe %TMP%\jdk.txt %TMP%\jre.txt | winutil\setvar.exe JAVAPATH > %TMP%\setjava.bat
     192    del %TMP%\jdk.txt
     193    del %TMP%\jre.txt
     194    call %TMP%\setjava.bat
     195    del %TMP%\setjava.bat
    196196
    197197    :: If nothing was found in the registry, we're stuck
  • gli/trunk/gli4gs3.bat

    r13027 r15354  
    8484:: Setup Greenstone 3, unless it has already been done
    8585if not "%GSDL3SRCHOME%" == "" goto doneGSDL3
    86     cd | winutil\setvar.exe GLIDIR > setgli.bat
    87     call setgli.bat
    88     del setgli.bat
     86    cd | winutil\setvar.exe GLIDIR > %TMP%\setgli.bat
     87    call %TMP%\setgli.bat
     88    del %TMP%\setgli.bat
    8989    cd "%GSDL3PATH%"
    9090    call gs3-setup.bat SetEnv > nul
     
    149149
    150150    :: Check if Perl is on the search path
    151     echo %PATH%| winutil\which.exe perl.exe | winutil\setvar.exe PERLPATH > setperl.bat
    152     call setperl.bat
    153     del setperl.bat
     151    echo %PATH%| winutil\which.exe perl.exe | winutil\setvar.exe PERLPATH > %TMP%\setperl.bat
     152    call %TMP%\setperl.bat
     153    del %TMP%\setperl.bat
    154154    if not "%PERLPATH%" == "" goto testPerl
    155155
     
    158158
    159159    :: Still haven't found anything, so try looking in the registry (gulp!)
    160     type nul > perl.reg
    161     regedit /E perl.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Perl"
    162     type perl.reg > perl.txt
    163     del perl.reg
    164 
    165     winutil\findperl.exe perl.txt | winutil\setvar.exe PERLPATH > setperl.bat
    166     del perl.txt
    167     call setperl.bat
    168     del setperl.bat
     160    type nul > %TMP%\perl.reg
     161    regedit /E %TMP%\perl.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Perl"
     162    type %TMP%\perl.reg > %TMP%\perl.txt
     163    del %TMP%\perl.reg
     164
     165    winutil\findperl.exe perl.txt | winutil\setvar.exe PERLPATH > %TMP%\setperl.bat
     166    del %TMP%\perl.txt
     167    call %TMP%\setperl.bat
     168    del %TMP%\setperl.bat
    169169
    170170    :: If nothing was found in the registry, we're stuck
     
    218218
    219219    :: Check if Java is on the search path
    220     echo %PATH%| winutil\which.exe java.exe | winutil\setvar.exe JAVAPATH > setjava.bat
    221     call setjava.bat
    222     del setjava.bat
     220    echo %PATH%| winutil\which.exe java.exe | winutil\setvar.exe JAVAPATH > %TMP%\setjava.bat
     221    call %TMP%\setjava.bat
     222    del %TMP%\setjava.bat
    223223    if not "%JAVAPATH%" == "" goto testJava
    224224
    225225    :: Still haven't found anything, so try looking in the registry (gulp!)
    226     type nul > jdk.reg
    227     regedit /E jdk.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit"
    228     type jdk.reg > jdk.txt
    229     del jdk.reg
    230     type nul > jre.reg
    231     regedit /E jre.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment"
    232     type jre.reg > jre.txt
    233     del jre.reg
    234 
    235     winutil\findjava.exe jdk.txt jre.txt | winutil\setvar.exe JAVAPATH > setjava.bat
    236     del jdk.txt
    237     del jre.txt
    238     call setjava.bat
    239     del setjava.bat
     226    type nul > %TMP%\jdk.reg
     227    regedit /E %TMP%\jdk.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit"
     228    type %TMP%\jdk.reg > %TMP%\jdk.txt
     229    del %TMP%\jdk.reg
     230    type nul > %TMP%\jre.reg
     231    regedit /E %TMP%\jre.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment"
     232    type %TMP%\jre.reg > %TMP%\jre.txt
     233    del %TMP%\jre.reg
     234
     235    winutil\findjava.exe jdk.txt jre.txt | winutil\setvar.exe JAVAPATH > %TMP%\setjava.bat
     236    del %TMP%\jdk.txt
     237    del %TMP%\jre.txt
     238    call %TMP%\setjava.bat
     239    del %TMP%\setjava.bat
    240240
    241241    :: If nothing was found in the registry, we're stuck
Note: See TracChangeset for help on using the changeset viewer.