[BioRuby-cvs] bioruby/bin bioruby,1.10,1.11

Katayama Toshiaki k at pub.open-bio.org
Thu Feb 9 16:29:12 UTC 2006


Update of /home/repository/bioruby/bioruby/bin
In directory pub.open-bio.org:/tmp/cvs-serv17647

Modified Files:
	bioruby 
Log Message:
* license changed
* if argument is given, 
  1. arg == dir  : chdir to the specified working directory at start up or
  2. arg == file : run the fille as a bioruby shell script or
  3. arg == str  : create the new directory to work on


Index: bioruby
===================================================================
RCS file: /home/repository/bioruby/bioruby/bin/bioruby,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** bioruby	7 Dec 2005 05:12:06 -0000	1.10
--- bioruby	9 Feb 2006 16:29:10 -0000	1.11
***************
*** 3,32 ****
  # = BioRuby shell - command line interface for the BioRuby library
  #
! # Copyright::	Copyright (C) 2005
! #		Toshiaki Katayama <k at bioruby.org>
! # License::	LGPL
  #
  # $Id$
  #
- #--
- #
- #  This library is free software; you can redistribute it and/or
- #  modify it under the terms of the GNU Lesser General Public
- #  License as published by the Free Software Foundation; either
- #  version 2 of the License, or (at your option) any later version.
- #
- #  This library 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
- #  Lesser General Public License for more details.
- #
- #  You should have received a copy of the GNU Lesser General Public
- #  License along with this library; if not, write to the Free Software
- #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- #
- #++
- #
- 
- # $: << File.dirname(__FILE__)+'/../lib'
  
  begin
--- 3,12 ----
  # = BioRuby shell - command line interface for the BioRuby library
  #
! # Copyright::   Copyright (C) 2005, 2006
! #               Toshiaki Katayama <k at bioruby.org>
! # License::     Ruby's
  #
  # $Id$
  #
  
  begin
***************
*** 39,42 ****
--- 19,40 ----
  
  include Bio::Shell
+ 
+ ### Command line argument
+ 
+ # working directory or script file
+ arg = ARGV.shift
+ if File.directory?(arg)
+   # directory or symlink to directory
+   Dir.chdir(arg)
+ elsif File.exists?(arg)
+   # BioRuby shell script (lib/bioruby.rb can be obsolete)
+   load arg
+   exit
+ elsif arg
+   Dir.mkdir(arg)
+   Dir.chdir(arg)
+ end
+ 
+ ### BioRuby shell setup
  
  # loading configuration and plugins




More information about the bioruby-cvs mailing list