From dc57a4e6c90c18b16bab323e778b36f7e549bc8f Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 1 Jul 2007 11:38:11 +0100 Subject: rant sisu installer --- Rantfile | 76 +++++++++++++--------------------------------------------------- install | 36 +++++++++++++++--------------- 2 files changed, 33 insertions(+), 79 deletions(-) diff --git a/Rantfile b/Rantfile index cf875f9c..04063df5 100644 --- a/Rantfile +++ b/Rantfile @@ -1,75 +1,29 @@ #!/usr/bin/env ruby raise 'Please, use ruby1.8.4 or later.' if RUBY_VERSION < '1.8.4' =begin - Rantfile mapping setup.rb directory structure + Rantfile installer for SiSU + * Homepage: + * Download: - SiSU Simple information Structuring Universe, Serialised information, Structured Units - * SiSU at present is for the Linux/Unix platform - * See homepage at: << http://www.jus.uio.no/sisu/SiSU >> - * & << http://www.jus.uio.no/sisu/download >> - Rant is a Ruby 'ant' by Stefan Lang - - For Setup/Installation SiSU uses either: - * Minero Aoki's setup.rb, provided along with SiSU, or - * Rant which may be downloaded and installed from: - http://make.rubyforge.org/ - - * Name: Rant install/setup file for SiSU - Simple information Structuring Universe, Serialised information Structured Units - * - * Author: Ralph@Amissah.com - * Description: Rant install/setup file which maps directory structure used by setup.rb - * arch-tag: Rant install/setup file which maps directory structure used by setup.rb - * $Id$ - - Copyright (C) 2005 Ralph Amissah (first release edition) - Copyright (C) 1997 Ralph Amissah (first edition) - - * License: GPL 2 or later - - Summary of GPL 2 + Copyright (C) 2007 Ralph Amissah - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. + * License: LGPL - GNU Lesser General Public License + [same license as Rant provided within the Rant package] - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + * Ralph Amissah + Ralph Amissah - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - - If you have Internet connection, the latest version of the GPL should be - available at these locations: - http://www.fsf.org/licenses/gpl.html - http://www.gnu.org/copyleft/gpl.html - http://www.jus.uio.no/sisu/gpl2.fsf - - SiSU was first released to the public on January 4th 2005 - - SiSU uses: - - * Standard SiSU markup syntax, - * Standard SiSU meta-markup syntax, and the - * Standard SiSU object citation numbering and system + Rant is a Ruby 'ant' by Stefan Lang + * Rant may be downloaded and installed from: + http://make.rubyforge.org/ - © Ralph Amissah 1997, current 2005. - All Rights Reserved. + Notes on use: - * Ralph Amissah mailto:ralph@amissah.com - Ralph Amissah mailto:amissah@gmail.com + rant -T - * NOTE reminder to create independent setup file called install: - rant-import --auto install - then you can, as root (for default action): - ruby install - or for help on alternative actions: - ruby install help - ruby install -T + SiSU can also be Setup/Installation using: + * Minero Aoki's setup.rb, provided along with SiSU, or =end #%% produce a makefile suitable for the target platform diff --git a/install b/install index 5858a748..78ad16a4 100644 --- a/install +++ b/install @@ -416,8 +416,8 @@ module Rant def valid_vid(obj) case obj - when String: obj - when Symbol: obj.to_s + when String; obj + when Symbol; obj.to_s else if obj.respond_to? :to_str obj.to_str @@ -1175,8 +1175,8 @@ module Rant def reference_name sd = rac.current_subdir case sd - when "": full_name - when project_subdir: name + when ""; full_name + when project_subdir; name else "@#{full_name}".sub(/^@#{Regexp.escape sd}\//, '') end end @@ -1857,8 +1857,8 @@ module Rant } } end - when Proc: src_arg - when nil: lambda { |name| [] } + when Proc; src_arg + when nil; lambda { |name| [] } else rac.abort_at(ch, "rule source has to be a " + "String, Array or Proc") @@ -1903,8 +1903,8 @@ module Rant def create_nodes(rel_project_dir, target, deps) @rant.goto_project_dir rel_project_dir case nodes = @block[target, deps] - when Array: nodes - when Node: [nodes] + when Array; nodes + when Node; [nodes] else @rant.abort_at(@ch, "Block has to " + "return Node or array of Nodes.") @@ -1929,11 +1929,11 @@ module Rant class Action def self.rant_gen(rac, ch, args, &block) case args.size - when 0: + when 0 unless (rac[:tasks] || rac[:stop_after_load]) yield end - when 1: + when 1 rx = args.first unless rx.kind_of? Regexp rac.abort_at(ch, "Action: argument has " + @@ -2016,8 +2016,8 @@ module Rant::Console def ask_yes_no text $stderr.print msg_prefix + text + " [y|n] " case $stdin.readline - when /y|yes/i: true - when /n|no/i: false + when /y|yes/i; true + when /n|no/i; false else $stderr.puts(' ' * msg_prefix.length + "Please answer with `yes' or `no'") @@ -2270,9 +2270,9 @@ class Rant::RantApp def expand_path(subdir, path) case path - when nil: subdir.dup - when "": subdir.dup - when /^@/: path.sub(/^@/, '') + when nil; subdir.dup + when ""; subdir.dup + when /^@/; path.sub(/^@/, '') else path = path.sub(/^\\(?=@)/, '') if subdir.empty? @@ -2762,7 +2762,7 @@ class Rant::RantApp return s if s } [] - when Rant::Node: [s] + when Rant::Node; [s] else # assuming list of tasks s end @@ -2779,7 +2779,7 @@ class Rant::RantApp return s if s } [] - when Rant::Node: [s] + when Rant::Node; [s] else s end @@ -2897,7 +2897,7 @@ class Rant::RantApp cmd_opts.quiet = true cmd_opts.each { |opt, value| case opt - when "--verbose": @opts[:verbose] += 1 + when "--verbose"; @opts[:verbose] += 1 when "--version" puts "rant #{Rant::VERSION}" raise Rant::RantDoneException -- cgit v1.2.3