aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/rename.rb
blob: a16ff63a204cda1ed4160ef00d8b937b7eb765da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'formula'

class Rename < Formula
  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