aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/dp.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-08-20 20:36:21 -0400
committerRalph Amissah <ralph@amissah.com>2014-08-20 20:36:21 -0400
commit68113824863c29cf751f492a170593360ea31f82 (patch)
treea4a1b776adeb9935321b26f98bae68c83ac3ed61 /lib/sisu/v6/dp.rb
parentdebian/changelog (5.6.1-1) (diff)
parentdocumentation related, sisu manual book index, and --no-stop command (diff)
Merge tag 'sisu_5.6.2' into debian/sid
SiSU 5.6.2
Diffstat (limited to 'lib/sisu/v6/dp.rb')
-rw-r--r--lib/sisu/v6/dp.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/sisu/v6/dp.rb b/lib/sisu/v6/dp.rb
index 50317108..111896d7 100644
--- a/lib/sisu/v6/dp.rb
+++ b/lib/sisu/v6/dp.rb
@@ -583,6 +583,34 @@ module SiSU_Param
def sep(str)
' \\\\ '
end
+ def copyright_and_license
+ s=if @h['all'] then @h['all']
+ else
+ s=''
+ if defined? copyright.text \
+ and copyright.text \
+ and not copyright.text.empty?
+ v=sep(copyright.text)
+ s +=copyright.text + v
+ end
+ if defined? copyright.license \
+ and copyright.license \
+ and not copyright.license.empty?
+ s +=copyright.license
+ end
+ if s.empty?
+ SiSU_Screen::Ansi.new(
+ @opt.act[:color_state][:set],
+ 'WARNING Document Rights information missing; provide @rights: :copyright:'
+ ).warn unless @opt.act[:quiet][:set]==:on
+ else
+ l,n=Db[:col_info_note],'rights.all'
+ validate_length(s,l,n)
+ end
+ s=s.gsub(/ [\\]+\s+$/,'')
+ end
+ s
+ end
def all
s=if @h['all'] then @h['all']
else