[BioRuby-cvs] bioruby/bin bioruby,1.15,1.16

Katayama Toshiaki k at dev.open-bio.org
Tue Jul 25 18:16:31 UTC 2006


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

Modified Files:
	bioruby 
Log Message:
* changed to show working directory when exit


Index: bioruby
===================================================================
RCS file: /home/repository/bioruby/bioruby/bin/bioruby,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** bioruby	27 Feb 2006 09:41:54 -0000	1.15
--- bioruby	25 Jul 2006 18:16:28 -0000	1.16
***************
*** 24,40 ****
  
  # command line argument (working directory or bioruby shell script file)
  script = nil
  if arg = ARGV.shift
    if File.directory?(arg)
      # directory or symlink to directory
!     Dir.chdir(arg)
    elsif File.exists?(arg)
      # BioRuby shell script (load script after the previous session is restored)
!     dir = File.dirname(arg)
      script = File.basename(arg)
!     Dir.chdir(dir)
!   elsif arg
!     Dir.mkdir(arg)
!     Dir.chdir(arg)
    end
  else
--- 24,43 ----
  
  # command line argument (working directory or bioruby shell script file)
+ workdir = nil
  script = nil
  if arg = ARGV.shift
    if File.directory?(arg)
      # directory or symlink to directory
!     workdir = arg
!     Dir.chdir(workdir)
    elsif File.exists?(arg)
      # BioRuby shell script (load script after the previous session is restored)
!     workdir = File.dirname(arg)
      script = File.basename(arg)
!     Dir.chdir(workdir)
!   else
!     workdir = arg
!     Dir.mkdir(workdir)
!     Dir.chdir(workdir)
    end
  else
***************
*** 150,151 ****
--- 153,160 ----
  Bio::Shell.save_session
  
+ if workdir
+   puts "Leaving directory '#{workdir}'."
+   puts "History is saved in '#{workdir}/#{Bio::Shell.history}'."
+ end
+ 
+ 




More information about the bioruby-cvs mailing list