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