Last change
on this file since 224 was
224,
checked in by pinsard, 17 years ago
|
improvements/corrections of some *.pro headers
|
-
Property svn:keywords set to
Id
|
File size:
981 bytes
|
Rev | Line | |
---|
[11] | 1 | ;+ |
---|
[128] | 2 | ; @file_comments |
---|
| 3 | ; if needed, define and create myuniquetmpdir |
---|
[93] | 4 | ; (common variable from cm_general) and add it to !path |
---|
[11] | 5 | ; |
---|
[157] | 6 | ; @categories |
---|
| 7 | ; Utilities |
---|
[11] | 8 | ; |
---|
[128] | 9 | ; @examples |
---|
[93] | 10 | ; IDL> def_myuniquetmpdir |
---|
[11] | 11 | ; |
---|
[224] | 12 | ; @uses |
---|
| 13 | ; cm_general |
---|
[11] | 14 | ; |
---|
[224] | 15 | ; @history |
---|
| 16 | ; Sebastien Masson (smasson\@lodyc.jussieu.fr) |
---|
[11] | 17 | ; June 2005 |
---|
| 18 | ; |
---|
[224] | 19 | ; @version |
---|
| 20 | ; $Id$ |
---|
[118] | 21 | ; |
---|
[11] | 22 | ;- |
---|
| 23 | PRO def_myuniquetmpdir |
---|
[114] | 24 | ; |
---|
| 25 | compile_opt idl2, strictarrsubs |
---|
| 26 | ; |
---|
[11] | 27 | @cm_general |
---|
| 28 | ; |
---|
| 29 | IF n_elements(myuniquetmpdir) EQ 0 THEN BEGIN |
---|
| 30 | ; define a new and unique directory in getenv('IDL_TMPDIR') by using systime(1) |
---|
| 31 | ; look for the login if we use "unix" system |
---|
| 32 | IF !d.name EQ 'X' THEN spawn, 'whoami', login, /noshell ELSE login = 'idl' |
---|
| 33 | myuniquetmpdir = file_search(getenv('IDL_TMPDIR'), /mark_directory) |
---|
| 34 | myuniquetmpdir = myuniquetmpdir[0] + login[0] + '.' $ |
---|
[128] | 35 | + strtrim(long(systime(1)), 1) + '/' |
---|
[11] | 36 | ; create it |
---|
| 37 | file_mkdir, myuniquetmpdir |
---|
| 38 | ; add it to !path |
---|
| 39 | !path = !path+ ':' + expand_path(myuniquetmpdir) |
---|
| 40 | ENDIF |
---|
| 41 | ; |
---|
| 42 | |
---|
| 43 | return |
---|
| 44 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.