diff options
| author | Adam Russell | 2015-03-29 03:36:16 +0530 | 
|---|---|---|
| committer | Mike McQuaid | 2015-04-14 11:38:09 -0700 | 
| commit | 88d01dc312ecc3498cf060af4de55e93d170c223 (patch) | |
| tree | 4c340c43563652be94a3c548373e4f3f96eda96f /Library | |
| parent | 303f5f45653e74ef9e2f242dc843d9c7ee1dc4c5 (diff) | |
| download | homebrew-88d01dc312ecc3498cf060af4de55e93d170c223.tar.bz2 | |
git-subrepo 0.2.1 (new formula)
Closes #38158.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/git-subrepo.rb | 41 | 
1 files changed, 41 insertions, 0 deletions
diff --git a/Library/Formula/git-subrepo.rb b/Library/Formula/git-subrepo.rb new file mode 100644 index 000000000..f047845f3 --- /dev/null +++ b/Library/Formula/git-subrepo.rb @@ -0,0 +1,41 @@ +class GitSubrepo < Formula +  homepage "https://github.com/ingydotnet/git-subrepo" +  head "https://github.com/ingydotnet/git-subrepo.git" + +  stable do +    url "https://github.com/ingydotnet/git-subrepo/archive/0.2.1.tar.gz" +    sha256 "2caa7f7c50af637b2338f0a6051401e6567ee059dc036eff7d859450a56865f1" + +    # Allow symbolic linking of git-subrepo script. +    # https://github.com/ingydotnet/git-subrepo/issues/75 +    patch do +      url "https://github.com/a1russell/git-subrepo/commit/393adca1ba49a53d01a8192900f500c4ed53fc27.diff" +      sha256 "2ba7666fa5eb34e2e84777e7e9fcd1c4a0248400e1af50b10f670a11494b1e17" +    end +  end + +  def install +    mkdir_p libexec +    system "make", "PREFIX=#{prefix}", "INSTALL_LIB=#{libexec}", "install" +    bin.install_symlink libexec/"git-subrepo" +  end + +  test do +    mkdir "mod" do +      system "git", "init" +      touch "HELLO" +      system "git", "add", "HELLO" +      system "git", "commit", "-m", "testing" +    end + +    mkdir "container" do +      system "git", "init" +      touch ".gitignore" +      system "git", "add", ".gitignore" +      system "git", "commit", "-m", "testing" + +      assert_match(/cloned into/, +                   shell_output("git subrepo clone ../mod mod")) +    end +  end +end  | 
