Changeset 28617

Show
Ignore:
Timestamp:
01/18/09 21:36:45 (4 years ago)
Author:
janus_wel
Message:

environment variable VIMPERATOR_HOME is obsolete in 2.0pre, so change variable name to HOME.
refactoring for readability.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • platform/firefox/vimperator-launcher/vimperator.cmd

    r23075 r28617  
    3636 
    3737// profile name is the first argument. 
    38 // if not specified, use default profile and .vimperatorrc in root directory. 
     38// if not specified, use default profile and vimperatorrc in root directory. 
    3939var args = WScript.Arguments; 
    4040var profileName = args.length ? args.Item(0) : ''; 
    4141var wshFSO = WScript.CreateObject('Scripting.FileSystemObject'); 
    42 var vimpHome = commonDir + wshFSO.FolderExists(commonDir + profileName) ? profileName : ''; 
     42var vimpHome = commonDir + (wshFSO.FolderExists(commonDir + profileName) ? profileName : ''); 
    4343 
    4444// environment variable MOZ_NO_REMOTE is bool to multiple launch for Firefox 
     
    4747for (var i=0, max=args.length ; i<max ; ++i) { 
    4848    var arg = args.Item(i); 
    49     if (noRemoteFlag = arg === '-no-remote') break; 
     49    if (arg === '-no-remote') { 
     50        noRemoteFlag = 'true'; 
     51        break; 
     52    } 
    5053} 
    5154 
    5255// set environment variables 
    53 envVar.Item('VIMPERATOR_HOME') = vimpHome; 
     56envVar.Item('HOME') = vimpHome; 
    5457if (noRemoteFlag) envVar.Item('MOZ_NO_REMOTE') = 1; 
    5558 
     
    5760var command = '"' + (envVar.Item('ProgramFiles') || 'C:\\Program Files') 
    5861                  + '\\Mozilla Firefox\\firefox.exe"'; 
    59 //if (noRemoteFlag) command += ' -no-remote'; 
    6062if (profileName) command += ' -P "' + profileName + '"'; 
    6163