Changeset 1263

Show
Ignore:
Timestamp:
01/31/10 23:09:12 (7 months ago)
Author:
astrange
Message:

Simplify mv/ditto/rm to just rm/ditto when installing.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/CPFPerianPrefPaneController.m

    r1262 r1263  
    456456         
    457457        if(oldExist) 
    458                 cmd = "mv -f \"$DST_COMPONENT\" \"$TMP_PATH\" && " 
    459                 "ditto -x -k --rsrc \"$SRC_ARCHIVE\" \"$DST_PATH\" && " 
    460                 "rm -rf \"$TMP_PATH\""; 
     458                cmd = "rm -rf \"$DST_COMPONENT\" && " 
     459                "ditto -x -k --rsrc \"$SRC_ARCHIVE\" \"$DST_PATH\""; 
    461460        else 
    462461                cmd = "mkdir -p \"$DST_PATH\" && " 
     
    466465        setenv("DST_PATH", [destination fileSystemRepresentation], 1); 
    467466        setenv("DST_COMPONENT", [finalPath fileSystemRepresentation], 1); 
    468         setenv("TMP_PATH", [[finalPath stringByAppendingPathExtension:@"old"] fileSystemRepresentation], 1); 
    469467         
    470468        int status = system(cmd); 
     
    476474        unsetenv("SRC_ARCHIVE"); 
    477475        unsetenv("DST_COMPONENT"); 
    478         unsetenv("TMP_PATH"); 
    479476        unsetenv("DST_PATH"); 
    480477        return ret; 
     
    490487         
    491488        if(oldExist) 
    492                 cmd = "mv -f \"$DST_COMPONENT\" \"$TMP_PATH\" && " 
     489                cmd = "rm -rf \"$DST_COMPONENT\" && " 
    493490                "ditto -x -k --rsrc \"$SRC_ARCHIVE\" \"$DST_PATH\" && " 
    494                 "rm -rf \"$TMP_PATH\" && " 
    495491                "chown -R root:admin \"$DST_COMPONENT\""; 
    496492        else 
     
    501497        setenv("SRC_ARCHIVE", [archivePath fileSystemRepresentation], 1); 
    502498        setenv("DST_COMPONENT", [finalPath fileSystemRepresentation], 1); 
    503         setenv("TMP_PATH", [[finalPath stringByAppendingPathExtension:@"old"] fileSystemRepresentation], 1); 
    504499        setenv("DST_PATH", [destination fileSystemRepresentation], 1); 
    505500         
     
    519514        unsetenv("SRC_ARCHIVE"); 
    520515        unsetenv("DST_COMPONENT"); 
    521         unsetenv("TMP_PATH"); 
    522516        unsetenv("DST_PATH"); 
    523517        return ret;