Add `bin` directory to PATH so build scripts may use scripts located there
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 24 May 2016 10:33:45 +0100
changeset 6 abb35e8d97a7
parent 5 0e2993dac13e
child 7 b6fe3a90f6e0
Add `bin` directory to PATH so build scripts may use scripts located there This is required especially on Windows as Windows do not ship with some basic tools (e.g. zip) by default. As a courtesy to the user, provide and our own.
Rakefile
rakelib/support.rb
--- a/Rakefile	Mon May 23 23:27:14 2016 +0100
+++ b/Rakefile	Tue May 24 10:33:45 2016 +0100
@@ -1,11 +1,6 @@
-# Following 3 lines are required to setup a Smalltalk/X rakefiles
-defined? STX_RAKEFILES or STX_RAKEFILES = ENV['STX_RAKEFILES'] || "."
-$:.push(STX_RAKEFILES)
-
+$:.push('.')
 require 'rakelib/support.rb'
 
-#include Rake::DSL
-
 import 'rakelib/help.rake'
 import 'rakelib/info.rake'
 import 'rakelib/debug.rake'
--- a/rakelib/support.rb	Mon May 23 23:27:14 2016 +0100
+++ b/rakelib/support.rb	Tue May 24 10:33:45 2016 +0100
@@ -1,3 +1,8 @@
+require 'rakelib/extensions.rb'
+require 'rakelib/rbspec.rb'
+require 'rakelib/vcs.rb'
+require 'rakelib/smalltalk-utils.rb'
+
 # Following hack is required to allow passing variable
 # values in `make` style, i.e., to allow for
 #
@@ -10,14 +15,11 @@
   end
 end
 
-module Rake
-end
-
-module Rake::StX
-end
+# Update PATH for build so build scripts may access 
+# scripts in `bin` directory. This is required especially
+# on Windows as Windows do not ship with some basic tools
+# (e.g. zip) by default. As a courtesy to the user, provide
+# our own
+ENV['PATH'] = "#{ENV['PATH']}#{File::PATH_SEPARATOR}#{File.expand_path('bin')}"
 
-require 'rakelib/extensions.rb'
-require 'rakelib/rbspec.rb'
-require 'rakelib/vcs.rb'
-require 'rakelib/smalltalk-utils.rb'