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/sisu3 | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'bin/sisu3') diff --git a/bin/sisu3 b/bin/sisu3 index f840f8bb..f479fedc 100644 --- a/bin/sisu3 +++ b/bin/sisu3 @@ -45,24 +45,22 @@ WOK $KCODE='u' if RUBY_VERSION < '1.9' argv=$* SiSU_version_dir=case argv.inspect - when /"(?:--v2)"/ - check_sisu_legacy_ruby_version? - 'v2' when /"(?:--v3)"/ check_sisu_stable_ruby_version? 'v3' + when /"(?:--v4)"/ + check_sisu_stable_ruby_version? + 'v4' when /"(?:--dev)"/ check_sisu_dev_ruby_version? - 'v3' + 'v4' else check_sisu_stable_ruby_version? 'v3' end SiSU_lib="sisu/#{SiSU_version_dir}" require "#{SiSU_lib}/hub" - unless SiSU_version_dir == 'v2' - SiSU::HubMaster.new(argv) - end + SiSU::HubMaster.new(argv) rescue STDERR.puts 'ERROR' STDERR.puts $! -- 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/sisu3 | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'bin/sisu3') diff --git a/bin/sisu3 b/bin/sisu3 index f479fedc..e1d30570 100644 --- a/bin/sisu3 +++ b/bin/sisu3 @@ -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? 'v3' 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' -- 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/sisu3 | 170 +------------------------------------------------------------- 1 file changed, 1 insertion(+), 169 deletions(-) mode change 100644 => 120000 bin/sisu3 (limited to 'bin/sisu3') diff --git a/bin/sisu3 b/bin/sisu3 deleted file mode 100644 index e1d30570..00000000 --- a/bin/sisu3 +++ /dev/null @@ -1,169 +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/sisu3 b/bin/sisu3 new file mode 120000 index 00000000..b4999d51 --- /dev/null +++ b/bin/sisu3 @@ -0,0 +1 @@ +sisu \ No newline at end of file -- cgit v1.2.3