aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-04-03 23:58:40 -0500
committerJack Nagel2014-04-03 23:58:40 -0500
commit43083c7ae13bfeaf91a69d6998adf051b48efccb (patch)
tree474d4591eddeb35a6b47a7c2d5cab86afbf13cfb /Library
parent8677948a6c80d9332d7f8b3e21d45b2502d040f3 (diff)
downloadhomebrew-43083c7ae13bfeaf91a69d6998adf051b48efccb.tar.bz2
xmlsh: simplify
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/xmlsh.rb38
1 files changed, 7 insertions, 31 deletions
diff --git a/Library/Formula/xmlsh.rb b/Library/Formula/xmlsh.rb
index bc385345a..efdd4fbf3 100644
--- a/Library/Formula/xmlsh.rb
+++ b/Library/Formula/xmlsh.rb
@@ -5,38 +5,14 @@ class Xmlsh < Formula
url 'https://downloads.sourceforge.net/project/xmlsh/xmlsh/1.2.4/xmlsh_1_2_4.zip'
sha1 'ef11e6fa3d72d99b78331a4ab58a22b1ad08b4ef'
- 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
+ rm_rf %w[win32 cygwin]
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')
+ chmod 0755, "#{libexec}/unix/xmlsh"
+ (bin/"xmlsh").write <<-EOS.undent
+ #!/bin/bash
+ export XMLSH=#{libexec}
+ exec #{libexec}/unix/xmlsh "$@"
+ EOS
end
end