mirror of https://github.com/Mikaela/Limnoria.git
Actually make use of the clean option.
This commit is contained in:
parent
29fc5681d3
commit
6402f43ac5
|
@ -30,6 +30,7 @@
|
||||||
###
|
###
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
import supybot
|
import supybot
|
||||||
|
|
||||||
|
@ -186,7 +187,7 @@ if __name__ == '__main__':
|
||||||
version='Supybot %s' % conf.version)
|
version='Supybot %s' % conf.version)
|
||||||
parser.add_option('-c', '--clean', action='store_true', default=False,
|
parser.add_option('-c', '--clean', action='store_true', default=False,
|
||||||
dest='clean', help='Cleans the various data/conf/logs '
|
dest='clean', help='Cleans the various data/conf/logs '
|
||||||
'directories before running tests.')
|
'directories after generating the docs.')
|
||||||
parser.add_option('--no-escape',
|
parser.add_option('--no-escape',
|
||||||
action='store_false', default=True, dest='escape',
|
action='store_false', default=True, dest='escape',
|
||||||
help='Disables escaping of html entities e.g., < as '
|
help='Disables escaping of html entities e.g., < as '
|
||||||
|
@ -194,7 +195,7 @@ if __name__ == '__main__':
|
||||||
parser.add_option('--plugins-dir',
|
parser.add_option('--plugins-dir',
|
||||||
action='append', dest='pluginsDirs', default=[],
|
action='append', dest='pluginsDirs', default=[],
|
||||||
help='Looks in in the given directory for plugins and '
|
help='Looks in in the given directory for plugins and '
|
||||||
'loads the tests from all of them.')
|
'generates documentation for all of them.')
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
# This must go before checking for args, of course.
|
# This must go before checking for args, of course.
|
||||||
|
@ -228,4 +229,9 @@ if __name__ == '__main__':
|
||||||
for Plugin in plugins:
|
for Plugin in plugins:
|
||||||
genDoc(Plugin, options.escape)
|
genDoc(Plugin, options.escape)
|
||||||
|
|
||||||
|
if options.clean:
|
||||||
|
shutil.rmtree(conf.supybot.directories.log())
|
||||||
|
shutil.rmtree(conf.supybot.directories.conf())
|
||||||
|
shutil.rmtree(conf.supybot.directories.data())
|
||||||
|
|
||||||
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=78:
|
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=78:
|
||||||
|
|
Loading…
Reference in New Issue