diff options
| author | Zearin | 2012-10-07 10:23:07 -0400 |
|---|---|---|
| committer | Adam Vandenberg | 2013-01-14 10:11:16 -0800 |
| commit | 1c6588579437726d0cfc30dd21a5190be07d2e8f (patch) | |
| tree | 7468d7c136035bf9ed070eceb5fbb9c13ebde231 /Library | |
| parent | cbc1ec6b96891a636c00da27b5e7a6fc235486a6 (diff) | |
| download | homebrew-1c6588579437726d0cfc30dd21a5190be07d2e8f.tar.bz2 | |
xmlsh 1.2.1
Closes #15339.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/xmlsh.rb | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Library/Formula/xmlsh.rb b/Library/Formula/xmlsh.rb new file mode 100644 index 000000000..7d9a6d28b --- /dev/null +++ b/Library/Formula/xmlsh.rb @@ -0,0 +1,42 @@ +require 'formula' + +class Xmlsh < Formula + homepage 'http://www.xmlsh.org' + url 'http://downloads.sourceforge.net/project/xmlsh/xmlsh/1.2.1/xmlsh_1_2_1.zip' + sha1 'be9d04b5cf3c770f350e530bfafb96bb4f21c73d' + + def shim_script target + <<-EOS.undent + #!/usr/bin/env bash + + # Used to set up classpaths + # + # Bash default variable values syntax: + # http://wiki.bash-hackers.org/syntax/pe#use_a_default_value + XMLSH=${XMLSH:-#{libexec}} && export XMLSH + + # Use XDG_CONFIG_HOME if it exists; + # Otherwise HOME + CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME} + + # Set up + XMLSHRC=${CONFIG_HOME}/.xmlshrc + + # Execute unix script + ${XMLSH}/unix/xmlsh -rcfile ${XMLSHRC} + EOS + end + + def install + libexec.install Dir["*"] + + # remove windows files + system "rm", "-rf", "#{libexec}/win32", "#{libexec}/cygwin" + + # make the unix executable...um, executable. + system "chmod", "a+x", "#{libexec}/unix/xmlsh" + + # Write mini-script to run as executable instead of `jar blah blah...` + (bin/'xmlsh').write shim_script('xmlsh') + end +end |
