bin/stalk in stalker-0.5.0 vs bin/stalk in stalker-0.5.1
- old
+ new
@@ -1,14 +1,16 @@
#!/usr/bin/env ruby
STDERR.sync = STDOUT.sync = true
-require File.dirname(__FILE__) + '/../lib/stalker'
+require File.expand_path('../../lib/stalker', __FILE__)
include Stalker
usage = "stalk <jobs.rb> [<job>[,<job>,..]]"
file = ARGV.shift or abort usage
jobs = ARGV.shift.split(',') rescue nil
+
+file = "./#{file}" unless file.match(/^[\/.]/)
require file
trap('INT') do
puts "\rExiting"