|
Last change
on this file since 288 was 269, checked in by Herwig Bauernfeind, 16 years ago |
|
Create branch for GUI tools
|
|
File size:
1.3 KB
|
| Line | |
|---|
| 1 | /* Initialize the temporary directory */
|
|---|
| 2 |
|
|---|
| 3 | /*:VRX */
|
|---|
| 4 | _InitTempDir:
|
|---|
| 5 | IF options.!debug == 1 THEN say '_InitTempDir() started'
|
|---|
| 6 | /* Get temporary directory */
|
|---|
| 7 | HaveNoTMPDIR = 0
|
|---|
| 8 | TempDir = translate(value('TMPDIR',,'OS2ENVIRONMENT'),'\','/')
|
|---|
| 9 | IF options.!debug == 1 THEN say ' TMPDIR="'TempDir'"'
|
|---|
| 10 | if TempDir = '' then do
|
|---|
| 11 | HaveNoTMPDIR = 1
|
|---|
| 12 | TempDir = translate(value('TEMP',,'OS2ENVIRONMENT'),'\','/')
|
|---|
| 13 | IF options.!debug == 1 THEN say ' TEMP="'TempDir'"'
|
|---|
| 14 | end
|
|---|
| 15 | if TempDir = '' then do
|
|---|
| 16 | TempDir = translate(value('TMP',,'OS2ENVIRONMENT'),'\','/')
|
|---|
| 17 | IF options.!debug == 1 THEN say ' TMP="'TempDir'"'
|
|---|
| 18 | end
|
|---|
| 19 | if TempDir = '' then do
|
|---|
| 20 | TempDir = directory()
|
|---|
| 21 | IF options.!debug == 1 THEN say ' Use current dir="'TempDir'"'
|
|---|
| 22 | end
|
|---|
| 23 | if HaveNoTMPDIR then do
|
|---|
| 24 | say 'WARNING! Setting missing TMPDIR variable to "'TempDir'".'
|
|---|
| 25 | IF options.!debug == 1 THEN say ' WARNING! Setting missing TMPDIR variable to "'TempDir'".'
|
|---|
| 26 | ok = value('TMPDIR',TempDir,'OS2ENVIRONMENT')
|
|---|
| 27 | end
|
|---|
| 28 | TempDir = strip(TempDir,'T','\')||'\' /* make sure there is trailing "\" */
|
|---|
| 29 | IF options.!debug == 1 THEN say '_InitTempDir() done, will use "'TempDir'"'
|
|---|
| 30 | return
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.