Skip to content

Instantly share code, notes, and snippets.

@mokagio
Forked from l4u/Guardfile
Created March 5, 2013 21:44
Show Gist options
  • Save mokagio/5094576 to your computer and use it in GitHub Desktop.
Save mokagio/5094576 to your computer and use it in GitHub Desktop.
guard :shell do
watch(%r{-hd\.png$}) do |m|
input = m[0]
output = input.gsub(/-hd.png$/,'.png')
puts "Downsizing #{input} to #{output}"
`convert #{input} -resize 50% #{output}`
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment