From 9d759c26177474a19442c66fde2e93e0ef7abd00 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 24 Sep 2011 08:32:19 -0400 Subject: debian/bin/* update checks, sisu2 added --- debian/bin/sisu | 52 ++++++++++++----- debian/bin/sisu2 | 146 ++++++++++++++++++++++++++++++++++++++++++++++ debian/bin/sisu3 | 54 ++++++++++++----- debian/bin/sisu_termsheet | 52 ++++++++++++----- debian/bin/sisu_webrick | 52 ++++++++++++----- 5 files changed, 295 insertions(+), 61 deletions(-) create mode 100644 debian/bin/sisu2 diff --git a/debian/bin/sisu b/debian/bin/sisu index d179579b..bdd71838 100644 --- a/debian/bin/sisu +++ b/debian/bin/sisu @@ -2,25 +2,24 @@ # encoding: utf-8 #SiSU: copyright (C) 1997 - 2011 Ralph Amissah; License GPL, see appended program information begin - def check_sisu_stable_ruby_version? - rbv_sisu_stable='1.9.2' #'1.8.7' - if RUBY_VERSION < rbv_sisu_stable - raise "Please, use Ruby#{rbv_sisu_stable} or later, current Ruby #{RUBY_VERSION}" - else check_incompatible_ruby_build? - end - end - def check_sisu_dev_ruby_version? - rbv_sisu_dev='1.9.2' - if RUBY_VERSION < rbv_sisu_dev - raise "Please, use Ruby#{rbv_sisu_dev} or later, current Ruby #{RUBY_VERSION}" + def ruby_version_ok?(base_version) + @v ||=RUBY_VERSION.scan(/\d+/) + vb=base_version.scan(/\d+/) + if @v[0].to_i < vb[0].to_i \ + or @v[0].to_i == vb[0].to_i \ + && @v[1].to_i < vb[1].to_i \ + or @v[0].to_i == vb[0].to_i \ + && @v[1].to_i == vb[1].to_i \ + && @v[1].to_i < vb[2].to_i + raise "Please, use Ruby#{vb} or later, current Ruby #{RUBY_VERSION}" else check_incompatible_ruby_build? end end def check_incompatible_ruby_build? require 'rbconfig' e=Config::CONFIG - if RUBY_VERSION == '1.9.2' \ - and e['PATCHLEVEL'].to_i < 180 + if RUBY_VERSION == '1.9.2' \ + && e['PATCHLEVEL'].to_i < 180 raise <. + + If you have Internet connection, the latest version of the GPL should be + available at these locations: + + + + + + + + * SiSU uses: + * Standard SiSU markup syntax, + * Standard SiSU meta-markup syntax, and the + * Standard SiSU object citation numbering and system + + * Hompages: + + + + * Download: + + + * Ralph Amissah + + diff --git a/debian/bin/sisu3 b/debian/bin/sisu3 index 66e57f11..473c18ce 100644 --- a/debian/bin/sisu3 +++ b/debian/bin/sisu3 @@ -2,25 +2,24 @@ # encoding: utf-8 #SiSU: copyright (C) 1997 - 2011 Ralph Amissah; License GPL, see appended program information begin - def check_sisu_stable_ruby_version? - rbv_sisu_stable='1.9.2' #'1.8.7' - if RUBY_VERSION < rbv_sisu_stable - raise "Please, use Ruby#{rbv_sisu_stable} or later, current Ruby #{RUBY_VERSION}" - else check_incompatible_ruby_build? - end - end - def check_sisu_dev_ruby_version? - rbv_sisu_dev='1.9.2' - if RUBY_VERSION < rbv_sisu_dev - raise "Please, use Ruby#{rbv_sisu_dev} or later, current Ruby #{RUBY_VERSION}" + def ruby_version_ok?(base_version) + @v ||=RUBY_VERSION.scan(/\d+/) + vb=base_version.scan(/\d+/) + if @v[0].to_i < vb[0].to_i \ + or @v[0].to_i == vb[0].to_i \ + && @v[1].to_i < vb[1].to_i \ + or @v[0].to_i == vb[0].to_i \ + && @v[1].to_i == vb[1].to_i \ + && @v[1].to_i < vb[2].to_i + raise "Please, use Ruby#{vb} or later, current Ruby #{RUBY_VERSION}" else check_incompatible_ruby_build? end end def check_incompatible_ruby_build? require 'rbconfig' e=Config::CONFIG - if RUBY_VERSION == '1.9.2' \ - and e['PATCHLEVEL'].to_i < 180 + if RUBY_VERSION == '1.9.2' \ + && e['PATCHLEVEL'].to_i < 180 raise <