summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xunperish15
1 files changed, 15 insertions, 0 deletions
diff --git a/unperish b/unperish
index 4bc6ef2..d293382 100755
--- a/unperish
+++ b/unperish
@@ -56,6 +56,9 @@ class Unperish(cliapp.Application):
'Debian source package name (typically detected '
'from debian/control)')
self.settings.string(['arch'], 'architecture for Debian packages')
+ self.settings.string(['web-directory'],
+ 'put files to go on the web in DIR',
+ metavar='DIR')
def process_args(self, args):
self.meta = self.create_meta()
@@ -228,6 +231,18 @@ class Unperish(cliapp.Application):
out = self.runcmd(['lintian', '-i'] + files, ignore_fail=True,
cwd=self.settings['build-area'])
self.output.write(out)
+
+ def cmd_publish_docs(self, args):
+ '''Publish docs related to this project.'''
+
+ docs = ['README', 'NEWS']
+ for doc in docs:
+ if os.path.exists(doc):
+ target = os.path.join(self.settings['web-directory'],
+ doc + '.mdwn')
+ if self.settings['verbose']:
+ print 'Copying %s to %s' % (doc, target)
+ shutil.copyfile(doc, target)
def cmd_clean(self, args):
'''Clean up the build-area (remove everything except the dir).'''