source: trunk/SRC/Utilities/mergeonline_help.pro @ 177

Last change on this file since 177 was 177, checked in by smasson, 18 years ago

updates of html files...

  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1;+
2; @file_comments
3; Have one unique online help for IDL and SAXO
4;
5; @categories
6; Documentation
7;
8; @uses
9; mergeonline_help.sh
10;
11; @restrictions
12; Works only with "Unix" type machine
13; Needs at least version 6.2
14;
15; @history
16; Sept 2006: Sebastien Masson (smasson\@lodyc.jussieu.fr)
17;
18; @version
19; $Id$
20;-
21PRO mergeonline_help
22;
23  compile_opt idl2, strictarrsubs
24;
25; Are we using a "Unix" machine?
26  IF !d.name NE 'X' THEN return
27; is the IDL version at least 6.2 ?
28  IF float(strmid(!version.release, 0, 3)) LT 6.2 THEN return
29; get the environment variable $HOME
30  home = getenv('HOME')
31; is it defined?
32  IF home EQ '' THEN return
33; is $HOME a writable directory?
34  home = (file_search(home, /test_directory, /test_write, /mark_directory))[0]
35  IF home EQ '' THEN return
36; is $HOME/.assistant a directory ? if not, create it
37  homeassist = home + '.assistant'
38  IF file_test(homeassist, /directory) EQ 0 THEN file_mkdir, homeassist
39; is $HOME/.assistant a writable directory?
40  homeassist = (file_search(homeassist, /test_directory, /test_write, /mark_directory))[0]
41  IF homeassist EQ '' THEN return
42; is "$HOME/.assistant/src a directory ? if not, create it?
43  homesrc = homeassist + 'src'
44  IF file_test(homesrc, /directory) EQ 0 THEN file_mkdir, homesrc
45; is $HOME/.assistant/src a writable directory?
46  homesrc = (file_search(homesrc, /test_directory, /test_write, /mark_directory))[0]
47  IF homesrc EQ '' THEN return
48; do idl.adp and home.html already exists?
49  IF file_test(homesrc + 'home.html') AND file_test(homesrc + 'idl.adp') $
50    AND file_test(homesrc + 'aboutsaxo.txt') THEN BEGIN
51    !help_path = homesrc
52    return
53  ENDIF
54; create idl.adp and home.html
55  homeidladp = !dir + '/help/online_help'
56  IF file_test(homeidladp + '/idl.adp') EQ 0 THEN BEGIN
57    print, 'Error when looking for the file '+homeidladp + '/idl.adp ...'
58    print, 'Check the value or your environment variable $IDL_DIR that defines !dir'
59    return
60  ENDIF
61  homesaxoadp = file_dirname(find('buildinit.pro'), /mark_directory) + 'Documentation/idldoc_assistant_output'
62
63  spawn, homesaxoadp + '/../xmldoc/mergeonline_help.sh' $
64         + ' ' + homeidladp $
65         + ' ' + homesaxoadp $
66         + ' ' + homesrc $
67         + ' ' + !version.release $
68         , /sh, exit_status = err
69;
70  IF err EQ 0 THEN !help_path = homesrc
71;
72  RETURN
73END
Note: See TracBrowser for help on using the repository browser.