Przeglądaj źródła

fix rest documentation creation for scripts installed by g.extension

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@52851 15284696-431f-4ddb-bdfa-cd5b030d7da7
Luca Delucchi 12 lat temu
rodzic
commit
49011160dd

+ 2 - 3
scripts/g.extension/g.extension.html

@@ -48,8 +48,7 @@ See also <a href="http://grass.osgeo.org/wiki/GRASS_AddOns">GRASS Addons</a> wik
 <h2>AUTHOR</h2>
 
 Markus Neteler<br>
-<a href="http://geo.fsv.cvut.cz/gwiki/Landa">Martin
-Landa</a>, <a href="http://www.cvut.cz">Czech Technical University in
-Prague</a>, Czech Republic
+<a href="http://geo.fsv.cvut.cz/gwiki/Landa">Martin Landa</a>, 
+<a href="http://www.cvut.cz">Czech Technical University in Prague</a>, Czech Republic
 
 <p><i>Last changed: $Date$</i>

+ 6 - 0
scripts/g.extension/g.extension.py

@@ -708,6 +708,7 @@ def install_extension_other(name):
     dirs = { 'bin'     : os.path.join(tmpdir, name, 'bin'),
              'docs'    : os.path.join(tmpdir, name, 'docs'),
              'html'    : os.path.join(tmpdir, name, 'docs', 'html'),
+             'rest'    : os.path.join(tmpdir, name, 'docs', 'rest'),
              'man'     : os.path.join(tmpdir, name, 'docs', 'man', 'man1'),
              'scripts' : os.path.join(tmpdir, name, 'scripts'),
              'etc'     : os.path.join(tmpdir, name, 'etc'),
@@ -718,6 +719,7 @@ def install_extension_other(name):
                    'MODULE_TOPDIR=%s' % gisbase.replace(' ', '\ '),
                    'BIN=%s' % dirs['bin'],
                    'HTMLDIR=%s' % dirs['html'],
+                   'RESTDIR=%s' % dirs['rest'],
                    'MANDIR=%s' % dirs['man'],
                    'SCRIPTDIR=%s' % dirs['scripts'],
                    'ETC=%s' % os.path.join(dirs['etc'],name)
@@ -748,6 +750,8 @@ def install_extension_other(name):
                        stdout = outdev):
         grass.fatal(_('Compilation failed, sorry. Please check above error messages.'))
     
+    import pdb; pdb.set_trace()
+    
     if flags['i'] or classchar == 'wx':
         return 0
     
@@ -835,6 +839,7 @@ def remove_extension_std(name, force = False):
     for fpath in [os.path.join(options['prefix'], 'bin', name),
                   os.path.join(options['prefix'], 'scripts', name),
                   os.path.join(options['prefix'], 'docs', 'html', name + '.html'),
+                  os.path.join(options['prefix'], 'docs', 'rest', name + '.txt'),
                   os.path.join(options['prefix'], 'docs', 'man', 'man1', name + '.1')]:
         if os.path.isfile(fpath):
             if force:
@@ -910,6 +915,7 @@ def create_dir(path):
 def check_dirs():
     create_dir(os.path.join(options['prefix'], 'bin'))           
     create_dir(os.path.join(options['prefix'], 'docs', 'html'))
+    create_dir(os.path.join(options['prefix'], 'docs', 'rest'))
     check_style_files('grass_logo.png')
     check_style_files('grassdocs.css')
     create_dir(os.path.join(options['prefix'], 'etc'))