|
|
|
@ -83,20 +83,26 @@ class build_man( distutils.core.Command ) :
|
|
|
|
|
def finalize_options( self ) :
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
def _install_man(self,man,baseLocale):
|
|
|
|
|
baseMan = path.basename(man)
|
|
|
|
|
man_num = man[-1]
|
|
|
|
|
manPath = path.join(BUILD_MAN_PATH,baseLocale,"man%s"%man_num)
|
|
|
|
|
self.mkpath(manPath)
|
|
|
|
|
manPath = path.join(manPath,baseMan)
|
|
|
|
|
self.copy_file(man,manPath)
|
|
|
|
|
cout("compress %s\n"% manPath)
|
|
|
|
|
system("bzip2 -f %s"%manPath)
|
|
|
|
|
|
|
|
|
|
def run( self ) :
|
|
|
|
|
buildManPath = BUILD_MAN_PATH
|
|
|
|
|
self.mkpath(buildManPath)
|
|
|
|
|
for locale in glob.glob("man/*"):
|
|
|
|
|
baseLocale = path.basename(locale)
|
|
|
|
|
for man in glob.glob("%s/*.[12345678]"%locale) :
|
|
|
|
|
baseMan = path.basename(man)
|
|
|
|
|
man_num = man[-1]
|
|
|
|
|
manPath = path.join(buildManPath,baseLocale,"man%s"%man_num)
|
|
|
|
|
self.mkpath(manPath)
|
|
|
|
|
manPath = path.join(manPath,baseMan)
|
|
|
|
|
self.copy_file(man,manPath)
|
|
|
|
|
cout("compress %s\n"% manPath)
|
|
|
|
|
system("bzip2 -f %s"%manPath)
|
|
|
|
|
if os.path.isfile(locale) and locale[-1].isdigit():
|
|
|
|
|
self._install_man(locale,"")
|
|
|
|
|
else:
|
|
|
|
|
for man in glob.glob("%s/*.[12345678]"%locale) :
|
|
|
|
|
self._install_man(man,baseLocale)
|
|
|
|
|
|
|
|
|
|
class install_man( install_data ) :
|
|
|
|
|
description = "install man files"
|
|
|
|
|