hardlink-osx 0.1.1 (new formula)
This commit is contained in:
parent
6f7448c8b4
commit
d8ff4143ba
1 changed files with 35 additions and 0 deletions
35
Formula/hardlink-osx.rb
Normal file
35
Formula/hardlink-osx.rb
Normal file
|
@ -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
|
Loading…
Reference in a new issue