Changeset 19027

Show
Ignore:
Timestamp:
17.04.2009 10:38:07 (11 years ago)
Author:
oranfry
Message:

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

Files:
1 modified

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 = "@installer.name@.tmp"; //temporary directory where we will store extracted files 
     15    string scratch = (getenv("TMPDIR") == NULL) ? "/tmp" : getenv("TMPDIR"); 
     16    string tempdir = scratch + "/@installer.name@.tmp"; //temporary directory where we will store extracted files 
    1517    string jarfile = tempdir + "/@installer.name@.jar"; //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