Commits

Barry Warsaw committed 38139cf

Add -i option to symlink index.html to the master doc.

  • Participants
  • Parent commits 9195d89

Comments (0)

Files changed (1)

sphinx/setup_command.py

         ('release=', None, 'The full version, including alpha/beta/rc tags'),
         ('today=', None, 'How to format the current date, used as the '
          'replacement for |today|'),
+        ('link-index', 'i', 'Link index.html to the master doc'),
     ]
-    boolean_options = ['fresh-env', 'all-files']
+    boolean_options = ['fresh-env', 'all-files', 'link-index']
 
 
     def initialize_options(self):
         self.release = ''
         self.today = ''
         self.config_dir = None
+        self.link_index = False
 
     def _guess_source_dir(self):
         for guess in ('doc', 'docs'):
                                                        'backslashreplace')
             else:
                 raise
+
+        if self.link_index:
+            src = app.config.master_doc + app.builder.out_suffix
+            dst = app.builder.get_outfilename('index')
+            os.symlink(src, dst)