rename event watch binary
This commit is contained in:
parent
ad0164ac76
commit
3e0ed70c69
6 changed files with 7 additions and 7 deletions
|
@ -31,13 +31,13 @@ task :build_vendor do
|
|||
extconf_path = File.expand_path("../ext/extconf.rb", __FILE__)
|
||||
extconf_contents = File.read(extconf_path)
|
||||
extconf_contents.sub!(/puts "Warning/, '#\0')
|
||||
extconf_contents.gsub!(/bin\/fsevent_watch/, 'bin/fsevent_watch_guard')
|
||||
extconf_contents.gsub!(/bin\/fsevent_watch/, 'bin/fsevent_watch_m')
|
||||
File.open(extconf_path, 'w') { |f| f << extconf_contents }
|
||||
|
||||
# Alter lib/middleman-core/vendor/darwin/lib/rb-fsevent/fsevent.rb
|
||||
fsevent_path = File.expand_path("../lib/middleman-core/vendor/darwin/lib/rb-fsevent/fsevent.rb", __FILE__)
|
||||
fsevent_contents = File.read(fsevent_path)
|
||||
fsevent_contents.sub!(/fsevent_watch/, 'fsevent_watch_guard')
|
||||
fsevent_contents.sub!(/fsevent_watch/, 'fsevent_watch_mm')
|
||||
fsevent_contents.sub!(/'\.\.'/, "'..', '..', '..', '..', '..'")
|
||||
|
||||
File.open(fsevent_path, 'w') { |f| f << fsevent_contents }
|
||||
|
|
|
@ -47,7 +47,7 @@ else
|
|||
|
||||
cc_bin = `which clang || which gcc`.to_s.strip!
|
||||
|
||||
compile_command = "CFLAGS='#{cflags.join(' ')} #{wflags.join(' ')}' #{cc_bin} #{cc_opts.join(' ')} -o '#{gem_root}/bin/fsevent_watch_guard' fsevent/fsevent_watch.c"
|
||||
compile_command = "CFLAGS='#{cflags.join(' ')} #{wflags.join(' ')}' #{cc_bin} #{cc_opts.join(' ')} -o '#{gem_root}/bin/fsevent_watch_mm' fsevent/fsevent_watch.c"
|
||||
|
||||
STDERR.puts(compile_command)
|
||||
|
||||
|
@ -55,7 +55,7 @@ else
|
|||
system "mkdir -p #{File.join(gem_root, 'bin')}"
|
||||
system compile_command
|
||||
|
||||
unless File.executable?("#{gem_root}/bin/fsevent_watch_guard")
|
||||
unless File.executable?("#{gem_root}/bin/fsevent_watch_mm")
|
||||
raise "Compilation of fsevent_watch failed (see README)"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,7 +7,7 @@ class FSEvent
|
|||
END
|
||||
class_eval <<-END
|
||||
def watcher_path
|
||||
"#{File.join(FSEvent.root_path, 'bin', 'fsevent_watch_guard')}"
|
||||
"#{File.join(FSEvent.root_path, 'bin', 'fsevent_watch_mm')}"
|
||||
end
|
||||
END
|
||||
end
|
||||
|
|
|
@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|||
s.summary = "Hand-crafted frontend development"
|
||||
s.description = "A static site generator based on Sinatra. Providing dozens of templating languages (Haml, Sass, Compass, Slim, CoffeeScript, and more). Makes minification, compression, cache busting, Yaml data (and more) an easy part of your development cycle."
|
||||
|
||||
s.files = `git ls-files`.split("\n") + %w(bin/fsevent_watch_guard)
|
||||
s.files = `git ls-files`.split("\n") + %w(bin/fsevent_watch_mm)
|
||||
s.test_files = `git ls-files -- {fixtures,features}/*`.split("\n")
|
||||
s.executable = "middleman"
|
||||
s.require_path = "lib"
|
||||
|
|
|
@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|||
s.summary = "Hand-crafted frontend development"
|
||||
s.description = "A static site generator based on Sinatra. Providing dozens of templating languages (Haml, Sass, Compass, Slim, CoffeeScript, and more). Makes minification, compression, cache busting, Yaml data (and more) an easy part of your development cycle."
|
||||
|
||||
s.files = `git ls-files`.split("\n") + %w(bin/fsevent_watch_guard)
|
||||
s.files = `git ls-files`.split("\n") + %w(bin/fsevent_watch_mm)
|
||||
s.test_files = `git ls-files -- {fixtures,features}/*`.split("\n")
|
||||
s.executable = "middleman"
|
||||
s.require_path = "lib"
|
||||
|
|
Loading…
Reference in a new issue