Changeset 22530

Show
Ignore:
Timestamp:
30.07.2010 16:15:57 (9 years ago)
Author:
sjm84
Message:

Using shift to remove the extra arguments that we add to prevent infinite loops

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/gli.bat

    r22526 r22530  
    2222    :: Invoke a new command processor to ensure there's enough environment space 
    2323    if "%1" == "Second" goto progName 
    24         command /E:2048 /C %0 Second %1 %2 %3 %4 %5 %6 %7 %8 %9 
    25         goto done 
    26  
     24        command /E:2048 /C %0 Second %1 %2 %3 %4 %5 %6 %7 %8 %9 
     25        shift 
     26        goto done 
    2727 
    2828:progName 
     
    4646:checkUserPermissions 
    4747echo Checking if the collection directory is writable... 
    48 echo This is a temporary file. It is safe to delete it. > "%GSDLHOME%\collect\testing.tmp" 
    49 if exist "%GSDLHOME%\collect\testing.tmp" goto deleteTempFile 
    50     if "%1" == "Elevated" goto findPerl 
    51     if "%2" == "Elevated" goto findPerl 
    52     "%GSDLHOME%\bin\windows\gstart.exe" %0 %1 Elevated %2 %3 %4 %5 %6 %7 %8 %9 
     48echo This is a temporary file. It is safe to delete it. > "%GSDLHOME%\collect\testing.tmp" 2>nul 
     49if exist "%GSDLHOME%\collect\testing.tmp" goto deleteTempFile  
     50    if "%1" == "Elevated" goto shiftElevated 
     51    "%GSDLHOME%\bin\windows\gstart.exe" %0 Elevated %1 %2 %3 %4 %5 %6 %7 %8 %9 
    5352    goto done 
    54      
     53 
    5554:deleteTempFile 
    5655del "%GSDLHOME%\collect\testing.tmp" 
    5756 
     57:shiftElevated 
     58:: Shift "Elevated" (one of our own internal command words) out of the way if present 
     59:: so the command-line is as it was when the user initiated the command 
     60if "%1" == "Elevated" shift 
     61 
    5862:findPerl 
    59 :: Now need to find Perl. If found, PERLPATH will be set 
     63:: Now need to find Perl. If found, PERLPATH will be set  
    6064call findperl.bat 
    6165if "%PERLPATH%" == "" goto exit