Changeset 19027 for release-kits


Ignore:
Timestamp:
2009-04-17T10:38:07+12:00 (15 years ago)
Author:
oranfry
Message:

use the official tmp directory so the installer works off non writable media

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release-kits/shared/linux/wrapper.cpp

    r18877 r19027  
    22#include <fstream>
    33#include <iomanip>
     4#include <cstdlib>
    45
    56using namespace std;
     
    1213int main(int argc, char** argv) {
    1314
    14     string tempdir = "@[email protected]"; //temporary directory where we will store extracted files
     15    string scratch = (getenv("TMPDIR") == NULL) ? "/tmp" : getenv("TMPDIR");
     16    string tempdir = scratch + "/@[email protected]"; //temporary directory where we will store extracted files
    1517    string jarfile = tempdir + "/@[email protected]"; //where we will store the jar file
    1618    string javafile = tempdir + "/@java.installer@"; //where we will store the java tar file
     
    110112    }
    111113
    112     //change back to the original directory
    113     chdir("..");
     114    //change to the scratch dir for the following operation
     115    chdir(scratch);
    114116
    115117    //delete the temp files
Note: See TracChangeset for help on using the changeset viewer.