homebrew-core/Formula/rename.rb
2015-06-05 14:47:57 +01:00

21 lines
540 B
Ruby

require 'formula'
class Rename < Formula
desc "Perl-powered file rename script with many helpful built-ins"
homepage 'http://plasmasturm.org/code/rename'
url 'https://github.com/ap/rename/archive/v1.600.tar.gz'
sha1 'a7946ce3602e3810aaa70300674ccb26832634ed'
def install
system 'pod2man', 'rename', 'rename.1'
bin.install 'rename'
man1.install 'rename.1'
end
test do
touch "foo.doc"
system "#{bin}/rename -s .doc .txt *.d*"
assert !File.exist?("foo.doc")
assert File.exist?("foo.txt")
end
end