Skip to content

Instantly share code, notes, and snippets.

@robmiller
Forked from Integralist/Guardfile
Last active August 29, 2015 14:12
Show Gist options
  • Save robmiller/fe79c89aa0f455c5cc1e to your computer and use it in GitHub Desktop.
Save robmiller/fe79c89aa0f455c5cc1e to your computer and use it in GitHub Desktop.
require "terminal-notifier-guard"
guard :shell do
watch(/src\/(.*\/)?(.*)\.rs$/) do |path, folder, file|
p "Path: #{path}"
p "Folder: #{folder}"
p "File: #{file}"
binary_name = File.read("Cargo.toml")[/name = "(.*)"/, 1]
`cargo build && ./target/#{binary_name}`
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment