2013-09-20 23:00:54 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Datomic < Formula
|
|
|
|
homepage 'http://www.datomic.com/'
|
2013-11-08 16:28:19 +00:00
|
|
|
url 'https://my.datomic.com/downloads/free/0.8.4260'
|
|
|
|
sha1 'a334173e40415f7489530c94bd4c1c7a5dbf0a5f'
|
|
|
|
version '0.8.4260'
|
2013-09-20 23:00:54 +00:00
|
|
|
|
|
|
|
def write_libexec_alias *script_names
|
|
|
|
script_names.each do |script_name|
|
|
|
|
alias_name = script_name == 'datomic' ? 'datomic' : "datomic-#{script_name}"
|
|
|
|
(bin + alias_name).write <<-EOS.undent
|
|
|
|
#!/bin/bash
|
|
|
|
cd #{libexec} && exec "bin/#{script_name}" "$@"
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
libexec.install Dir['*']
|
|
|
|
write_libexec_alias 'datomic', 'transactor', 'repl', 'repl-jline', 'rest', 'shell'
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats
|
|
|
|
<<-EOS.undent
|
|
|
|
You may need to set JAVA_HOME:
|
|
|
|
export JAVA_HOME="$(/usr/libexec/java_home)"
|
|
|
|
All commands have been installed with the prefix 'datomic-'.
|
2013-10-30 17:44:55 +00:00
|
|
|
|
|
|
|
We agreed to the Datomic Free Edition License for you:
|
|
|
|
http://www.datomic.com/datomic-free-edition-license.html
|
|
|
|
If this is unacceptable you should uninstall.
|
2013-09-20 23:00:54 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|