diff -ur tar2rubyscript-0.4.5.tar.gz/tar2rubyscript/CHANGELOG tar2rubyscript-0.4.6.tar.gz/tar2rubyscript/CHANGELOG
--- tar2rubyscript-0.4.5.tar.gz/tar2rubyscript/CHANGELOG	2005-06-20 23:58:23.806512744 +0200
+++ tar2rubyscript-0.4.6.tar.gz/tar2rubyscript/CHANGELOG	2005-06-20 23:56:31.000000000 +0200
@@ -0,0 +1,193 @@
+----------------------------------------------------------------
+
+0.4.6 - 21.06.2005
+
+* Added both temporary directories to $: and ENV["PATH"].
+
+----------------------------------------------------------------
+
+0.4.5 - 23.03.2005
+
+* newlocation is an absolute path.
+
+* ENV["TEMP"] is an absolute path.
+
+* Files to include are searched for with *.* instead of * (on
+  Windows).
+
+* Added TAR2RUBYSCRIPT.
+
+----------------------------------------------------------------
+
+0.4.4 - 18.01.2005
+
+* Fixed a bug concerning read-only files.
+
+----------------------------------------------------------------
+
+0.4.3 - 13.01.2005
+
+* The changes made by tar2rubyscript.bat and tar2rubyscript.sh
+  aren´t permanent anymore.
+
+* tar2rubyscript.bat and tar2rubyscript.sh now work for the TAR
+  archive variant as well.
+
+* Added support for long filenames in GNU TAR archives
+  (GNUTYPE_LONGNAME).
+
+* Enhanced the deleting of the temporary files.
+
+* Added support for ENV["PATH"].
+
+* Fixed a bug concerning multiple require-ing of (different)
+  init.rb´s.
+
+* Fixed a bug concerning backslashes when creating the TAR
+  archive.
+
+----------------------------------------------------------------
+
+0.4.2 - 27.12.2004
+
+* Added support for multiple library RBA´s.
+
+* Added the hourly touching of the files.
+
+* Added oldlocation to $: .
+
+----------------------------------------------------------------
+
+0.4.1 - 18.12.2004
+
+* Added --tar2rubyscript-list.
+
+* Put the temporary directory on top of $:, instead of at the
+  end, so the embedded libraries are preferred over the locally
+  installed libraries.
+
+* Fixed a bug when executing init.rb from within another
+  directory.
+
+----------------------------------------------------------------
+
+0.4.0 - 03.12.2004
+
+* Like packing related application files into one RBA
+  application, now you can as well pack related library files
+  into one RBA library.
+
+----------------------------------------------------------------
+
+0.3.8 - 26.03.2004
+
+* Under some circumstances, the Ruby script was replaced by the
+  tar archive when using --tar2rubyscript-totar.
+
+----------------------------------------------------------------
+
+0.3.7 - 22.02.2004
+
+* "ustar00" on Solaris isn´t "ustar00", but "ustar\00000".
+
+----------------------------------------------------------------
+
+0.3.6 - 08.11.2003
+
+* Made the common test if __file__ == $0 work.
+
+----------------------------------------------------------------
+
+0.3.5 - 29.10.2003
+
+* The instance_eval solution gave me lots of troubles. Replaced
+  it with load.
+
+* --tar2rubyscript-totar added.
+
+----------------------------------------------------------------
+
+0.3.4 - 23.10.2003
+
+* I used eval has a method of the object that executes init.rb.
+  That wasn´t a good name. Renamed it.
+
+* oldandnewlocation.rb added. It contains dummy procedures for
+  oldlocation and newlocation.
+
+----------------------------------------------------------------
+
+0.3.3 - 17.10.2003
+
+* No need of tar.exe anymore.
+
+----------------------------------------------------------------
+
+0.3.2 - 10.10.2003
+
+* The name of the output file is derived if it´s not provided.
+
+----------------------------------------------------------------
+
+0.3.1 - 04.10.2003
+
+* Execution of tar2rubyscript.sh or tar2rubyscript.bat is
+  added.
+
+* Methods oldlocation and newlocation are added.
+
+----------------------------------------------------------------
+
+0.3 - 21.09.2003
+
+* Input can be a directory as well. (External tar needed!)
+
+----------------------------------------------------------------
+
+0.2 - 14.09.2003
+
+* Handling of --tar2rubyscript-* parameters is added.
+
+* --tar2rubyscript-justextract added.
+
+----------------------------------------------------------------
+
+0.1.5 - 09.09.2003
+
+* The ensure block (which deleted the temporary files after
+  evaluating init.rb) is transformed to an on_exit block. Now
+  the application can perform an exit and trap signals.
+
+----------------------------------------------------------------
+
+0.1.4 - 31.08.2003
+
+* After editing with edit.com on win32, files are converted
+  from LF to CRLF. So the CR´s has to be removed.
+
+----------------------------------------------------------------
+
+0.1.3 - 29.08.2003
+
+* A much better (final?) patch for the previous bug. All open
+  files, opened in init.rb, are closed, before deleting them.
+
+----------------------------------------------------------------
+
+0.1.2 - 27.08.2003
+
+* A better patch for the previous bug.
+
+----------------------------------------------------------------
+
+0.1.1 - 19.08.2003
+
+* A little bug concerning file locking under Windows is fixed.
+
+----------------------------------------------------------------
+
+0.1 - 18.08.2003
+
+* First release.
+
+----------------------------------------------------------------
diff -ur tar2rubyscript-0.4.5.tar.gz/tar2rubyscript/ev/oldandnewlocation.rb tar2rubyscript-0.4.6.tar.gz/tar2rubyscript/ev/oldandnewlocation.rb
--- tar2rubyscript-0.4.5.tar.gz/tar2rubyscript/ev/oldandnewlocation.rb	2005-03-26 18:03:51.000000000 +0100
+++ tar2rubyscript-0.4.6.tar.gz/tar2rubyscript/ev/oldandnewlocation.rb	2005-06-20 23:58:05.000000000 +0200
@@ -1,9 +1,10 @@
 temp	= File.expand_path((ENV["TMPDIR"] or ENV["TMP"] or ENV["TEMP"] or "/tmp").gsub(/\\/, "/"))
 dir	= "#{temp}/oldandnewlocation.#{Process.pid}"
 
-ENV["OLDDIR"]	= Dir.pwd				unless ENV.include?("OLDDIR")
-ENV["NEWDIR"]	= File.expand_path(File.dirname($0))	unless ENV.include?("NEWDIR")
-ENV["TEMPDIR"]	= dir					unless ENV.include?("TEMPDIR")
+ENV["OLDDIR"]	= Dir.pwd								unless ENV.include?("OLDDIR")
+ENV["NEWDIR"]	= File.expand_path(File.dirname($0))					unless ENV.include?("NEWDIR")
+ENV["OWNDIR"]	= File.expand_path(File.dirname((caller[-1] or $0).gsub(/:\d+$/, "")))	unless ENV.include?("OWNDIR")
+ENV["TEMPDIR"]	= dir									unless ENV.include?("TEMPDIR")
 
 class Dir
   def self.rm_rf(entry)
@@ -76,6 +77,27 @@
 end
 
 begin
+  ownlocation
+rescue NameError
+  def ownlocation(file="")
+    dir	= ENV["OWNDIR"]
+    res	= nil
+
+    if block_given?
+      pdir	= Dir.pwd
+
+      Dir.chdir(dir)
+        res	= yield
+      Dir.chdir(pdir)
+    else
+      res	= File.expand_path(file, dir)	unless file.nil?
+    end
+
+    res
+  end
+end
+
+begin
   tmplocation
 rescue NameError
   dir	= ENV["TEMPDIR"]
diff -ur tar2rubyscript-0.4.5.tar.gz/tar2rubyscript/init.rb tar2rubyscript-0.4.6.tar.gz/tar2rubyscript/init.rb
--- tar2rubyscript-0.4.5.tar.gz/tar2rubyscript/init.rb	2005-01-29 19:41:14.000000000 +0100
+++ tar2rubyscript-0.4.6.tar.gz/tar2rubyscript/init.rb	2005-05-18 18:05:10.000000000 +0200
@@ -37,11 +37,14 @@
 licensefile	= oldlocation(ARGV.shift)
 
 if tarfile.nil?
+  usagescript	= "init.rb"
+  usagescript	= "tar2rubyscript.rb"	if defined?(TAR2RUBYSCRIPT)
+
   $stderr.puts <<-EOF
 
-	Usage: ruby init.rb application.tar [application.rb [licence.txt]]
+	Usage: ruby #{usagescript} application.tar [application.rb [licence.txt]]
 	       or
-	       ruby init.rb application[/] [application.rb [licence.txt]]
+	       ruby #{usagescript} application[/] [application.rb [licence.txt]]
 	
 	If \"application.rb\" is not provided or equals to \"-\", it will
 	be derived from \"application.tar\" or \"application/\".
diff -ur tar2rubyscript-0.4.5.tar.gz/tar2rubyscript/tarrubyscript.rb tar2rubyscript-0.4.6.tar.gz/tar2rubyscript/tarrubyscript.rb
--- tar2rubyscript-0.4.5.tar.gz/tar2rubyscript/tarrubyscript.rb	2005-03-11 17:10:09.000000000 +0100
+++ tar2rubyscript-0.4.6.tar.gz/tar2rubyscript/tarrubyscript.rb	2005-06-16 21:08:46.000000000 +0200
@@ -426,6 +426,20 @@
     res
   end
 
+  def tmplocation(file="")
+    if block_given?
+      pdir	= Dir.pwd
+
+      Dir.chdir(@tempdir)
+        res	= yield
+      Dir.chdir(pdir)
+    else
+      res	= File.expand_path(file, @tempdir)	if not file.nil?
+    end
+
+    res
+  end
+
   def self.oldlocation(file="")
     if block_given?
       @@tempspace.oldlocation { yield }
@@ -441,6 +455,14 @@
       @@tempspace.newlocation(file)
     end
   end
+
+  def self.tmplocation(file="")
+    if block_given?
+      @@tempspace.tmplocation { yield }
+    else
+      @@tempspace.tmplocation(file)
+    end
+  end
 end
 
 class Extract
@@ -506,6 +528,14 @@
   end
 end
 
+def tmplocation(file="")
+  if block_given?
+    TempSpace.tmplocation { yield }
+  else
+    TempSpace.tmplocation(file)
+  end
+end
+
 if ShowContent
   Content.new.list.cleanup
 elsif JustExtract
@@ -515,14 +545,17 @@
 else
   TempSpace.new.extract.cleanup
 
+  $:.unshift(tmplocation)
   $:.unshift(newlocation)
   $:.push(oldlocation)
 
   s	= ENV["PATH"].dup
   if Dir.pwd[1..2] == ":/"	# Hack ???
+    s << ";#{tmplocation.gsub(/\//, "\\")}"
     s << ";#{newlocation.gsub(/\//, "\\")}"
     s << ";#{oldlocation.gsub(/\//, "\\")}"
   else
+    s << ":#{tmplocation}"
     s << ":#{newlocation}"
     s << ":#{oldlocation}"
   end
diff -ur tar2rubyscript-0.4.5.tar.gz/tar2rubyscript/VERSION tar2rubyscript-0.4.6.tar.gz/tar2rubyscript/VERSION
--- tar2rubyscript-0.4.5.tar.gz/tar2rubyscript/VERSION	2005-03-26 18:03:51.000000000 +0100
+++ tar2rubyscript-0.4.6.tar.gz/tar2rubyscript/VERSION	2005-06-20 23:58:05.000000000 +0200
@@ -1 +1 @@
-0.4.5
+0.4.6