From 804a103722aa7731ca7f2062ee2ebf533607e6aa Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 3 Oct 2012 00:11:08 -0400 Subject: v4: 4.0.0 new branch & version & changelog "opened" --- bin/sisu4 | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 bin/sisu4 (limited to 'bin/sisu4') diff --git a/bin/sisu4 b/bin/sisu4 new file mode 100644 index 00000000..9d27ad6d --- /dev/null +++ b/bin/sisu4 @@ -0,0 +1,134 @@ +#!/usr/bin/env ruby +# encoding: utf-8 +#SiSU: copyright (C) 1997 - 2012 Ralph Amissah; License GPL, see appended program information +begin + 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' \ + && 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 + + -- cgit v1.2.3 From ac4a6aaa1f4db1237f2a0192a5dc63c8c4057be9 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 3 Oct 2012 00:15:31 -0400 Subject: v4: bin/sisu $0, make possible to run sisu command on/within project dir tree * (previously sisu needed to be correctly installed with system paths honored) * NOTE: loading of skins turned off --- bin/sisu4 | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'bin/sisu4') diff --git a/bin/sisu4 b/bin/sisu4 index 9d27ad6d..ec515326 100644 --- a/bin/sisu4 +++ b/bin/sisu4 @@ -41,6 +41,15 @@ WOK rbv_sisu_dev='1.9.2' ruby_version_ok?(rbv_sisu_dev) end + def require_hub_path(sisu_path_specified_lib_) + sisu_path_lib=if sisu_path_specified_lib_ \ + && FileTest.file?("#{sisu_path_specified_lib_}/#{SiSU_lib}/hub.rb") + "#{sisu_path_specified_lib_}/#{SiSU_lib}" + else + SiSU_lib + end + end +#% sisu branch $VERBOSE=nil $KCODE='u' if RUBY_VERSION < '1.9' argv=$* @@ -58,8 +67,34 @@ WOK check_sisu_stable_ruby_version? 'v4' end +#% $0 + e=Config::CONFIG + SiSU_lib="sisu/#{SiSU_version_dir}" + sisu_path_specified_lib_=if $0 =~ /^#{e['bindir']}\/sisu[34]?$/ + nil + elsif $0 !~ /^#{e['bindir']}\/sisu[34]?$/ \ + && $0 =~/bin\/sisu[34]?$/ \ + && FileTest.file?($0) + $0.sub(/bin\/sisu[34]?$/,'lib'). + sub(/^lib$/,"#{Dir.pwd}/lib") + elsif $0 !~ /^#{e['bindir']}\/sisu[34]?$/ \ + && $0 =~/^sisu[34]?$/ \ + && FileTest.file?($0) + $0.sub(/sisu[34]?$/,'../lib') + #bug, relative path does not work for sisu version information + else + nil + end + SiSU_path_specified_Version_=if sisu_path_specified_lib_ + sisu_path_specified_lib_.sub(/\/lib/, + "/data/sisu/#{SiSU_version_dir}/v/version.yml") + else + nil + end + SiSU_path_lib="#{require_hub_path(sisu_path_specified_lib_)}" +#% SiSU_lib="sisu/#{SiSU_version_dir}" - require "#{SiSU_lib}/hub" + require "#{SiSU_path_lib}/hub" SiSU::HubMaster.new(argv) rescue STDERR.puts 'ERROR' @@ -79,6 +114,7 @@ rescue system RUBYPATH: ${RUBYPATH} system RUBYLIB: ${RUBYLIB} "}) +#ensure end __END__ -- cgit v1.2.3 From f6bc7d81dee102b438a9118a66a2f2a86382c729 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 3 Oct 2012 00:16:59 -0400 Subject: v4: bin/sisu $*, hub, make possible to specify dir path for markup files * bin/sisu4 & bin/sisu3 now syslinks to bin/sisu --- bin/sisu4 | 171 +------------------------------------------------------------- 1 file changed, 1 insertion(+), 170 deletions(-) mode change 100644 => 120000 bin/sisu4 (limited to 'bin/sisu4') diff --git a/bin/sisu4 b/bin/sisu4 deleted file mode 100644 index ec515326..00000000 --- a/bin/sisu4 +++ /dev/null @@ -1,170 +0,0 @@ -#!/usr/bin/env ruby -# encoding: utf-8 -#SiSU: copyright (C) 1997 - 2012 Ralph Amissah; License GPL, see appended program information -begin - 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' \ - && 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/bin/sisu4 b/bin/sisu4 new file mode 120000 index 00000000..b4999d51 --- /dev/null +++ b/bin/sisu4 @@ -0,0 +1 @@ +sisu \ No newline at end of file -- cgit v1.2.3