diff options
| author | Dominyk Tiller | 2014-10-31 21:01:25 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-10-31 22:09:21 +0000 |
| commit | e728e750db20c51b9d0dea3a56bf3ac6474d1179 (patch) | |
| tree | edea464b72e80a0118a8afc854ab770a2960b6c4 /Library/Formula | |
| parent | e5f96da8280af2fd7ba142a215ea8ac29a1e39b4 (diff) | |
| download | homebrew-e728e750db20c51b9d0dea3a56bf3ac6474d1179.tar.bz2 | |
hardlink-osx 0.1.1 (new formula)
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/hardlink-osx.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Library/Formula/hardlink-osx.rb b/Library/Formula/hardlink-osx.rb new file mode 100644 index 000000000..276f8b943 --- /dev/null +++ b/Library/Formula/hardlink-osx.rb @@ -0,0 +1,35 @@ +require "formula" + +class HardlinkOsx < Formula + homepage "https://github.com/selkhateeb/hardlink" + url "https://github.com/selkhateeb/hardlink/archive/v0.1.1.tar.gz" + sha1 "ce89e04b7c6b31a06b497449f2d383a7dab513fb" + + def install + system "make" + bin.mkdir + system "make", "install", "PREFIX=#{prefix}" + end + + def caveats; <<-EOS.undent + Hardlinks can not be created under the same directory root. If you try to + `hln source directory` to target directory under the same root you will get an error! + + Also, remember the binary is named `hln` due to a naming conflict. + EOS + end + + test do + system "mkdir", "-p", "test1/inner" + system "touch", "test1/inner/file" + system "mkdir", "otherdir" + system "#{bin}/hln", "test1", "otherdir/test2" + + system "test", "-d", "otherdir/test2" + assert_equal 0, $?.exitstatus + system "test", "-d", "otherdir/test2/inner" + assert_equal 0, $?.exitstatus + system "test", "-f", "otherdir/test2/inner/file" + assert_equal 0, $?.exitstatus + end +end |
