2011-06-10 02:51:40 +00:00
|
|
|
class Cpmtools < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Tools to access CP/M file systems"
|
2015-08-03 12:55:31 +00:00
|
|
|
homepage "http://www.moria.de/~michael/cpmtools/"
|
|
|
|
url "http://www.moria.de/~michael/cpmtools/files/cpmtools-2.20.tar.gz"
|
|
|
|
sha256 "d8c7e78a9750994124f3aab6e461da8fa0021acc7dbad76eafbac8b0ed8279d3"
|
2011-06-10 02:51:40 +00:00
|
|
|
|
2014-12-12 20:01:44 +00:00
|
|
|
bottle do
|
|
|
|
sha1 "a437721156fa15a612e823e4f1ee0fdbfe2d0ed7" => :yosemite
|
|
|
|
sha1 "43ea7f0a371628133d4c46e249c32f0a619ad45f" => :mavericks
|
|
|
|
sha1 "537d26d243827c8d1506305fce70e9eab7604eaa" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2011-06-10 02:51:40 +00:00
|
|
|
def install
|
|
|
|
system "./configure", "--prefix=#{prefix}"
|
|
|
|
|
|
|
|
bin.mkpath
|
|
|
|
man1.mkpath
|
|
|
|
man5.mkpath
|
|
|
|
|
2015-08-03 12:55:31 +00:00
|
|
|
system "make", "install"
|
2011-06-10 02:51:40 +00:00
|
|
|
end
|
2014-02-11 05:54:09 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
# make a disk image
|
|
|
|
image = testpath/"disk.cpm"
|
|
|
|
system "#{bin}/mkfs.cpm -f ibm-3740 #{image}"
|
|
|
|
|
|
|
|
# copy a file into the disk image
|
|
|
|
src = testpath/"foo"
|
|
|
|
src.write "a" * 128
|
|
|
|
system "#{bin}/cpmcp -f ibm-3740 #{image} #{src} 0:foo"
|
|
|
|
|
|
|
|
# check for the file in the cp/m directory
|
2014-05-04 19:12:41 +00:00
|
|
|
assert shell_output("#{bin}/cpmls -f ibm-3740 #{image}").include?("foo")
|
2014-02-11 05:54:09 +00:00
|
|
|
|
|
|
|
# copy the file back out of the image
|
|
|
|
dest = testpath/"bar"
|
|
|
|
system "#{bin}/cpmcp -f ibm-3740 #{image} 0:foo #{dest}"
|
|
|
|
assert_equal src.read, dest.read
|
|
|
|
end
|
2011-06-10 02:51:40 +00:00
|
|
|
end
|