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