aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorBrennon York2014-05-15 22:26:22 -0400
committerAdam Vandenberg2014-05-23 16:28:31 -0700
commit8575b4ce6bf8de5b60cd6ea01abfa69a9af99cc3 (patch)
treec044f07c5c38271d24deb58b849fd3f150d2473c /Library/Formula
parent1fa7b315b172b0265f671ce306b27b08560d20f6 (diff)
downloadhomebrew-8575b4ce6bf8de5b60cd6ea01abfa69a9af99cc3.tar.bz2
Rexster Console 2.5.0
Closes #29292. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/rexster-console.rb49
1 files changed, 49 insertions, 0 deletions
diff --git a/Library/Formula/rexster-console.rb b/Library/Formula/rexster-console.rb
new file mode 100644
index 000000000..45374fb59
--- /dev/null
+++ b/Library/Formula/rexster-console.rb
@@ -0,0 +1,49 @@
+require "formula"
+
+class RexsterConsole < Formula
+ homepage "https://github.com/tinkerpop/rexster/wiki"
+ url "http://tinkerpop.com/downloads/rexster/rexster-console-2.5.0.zip"
+ sha1 "0243908c0ab65baea4b8092bb2b818c597622187"
+
+ patch :DATA
+
+ def install
+ libexec.install %w[lib doc]
+ (libexec/"ext").mkpath
+ (libexec/"bin").install "bin/rexster-console.sh" => "rexster-console"
+ bin.install_symlink libexec/"bin/rexster-console"
+ end
+
+ test do
+ system "#{bin}/rexster-console", "-h"
+ end
+end
+
+__END__
+diff --git a/bin/rexster-console.sh b/bin/rexster-console.sh
+index 3fb2022..29554a5 100755
+--- a/bin/rexster-console.sh
++++ b/bin/rexster-console.sh
+@@ -1,8 +1,19 @@
+ #!/bin/bash
+
+-CP=$( echo `dirname $0`/../lib/*.jar . | sed 's/ /:/g')
+-CP=$CP:$( echo `dirname $0`/../ext/*.jar . | sed 's/ /:/g')
+-#echo $CP
++# From: http://stackoverflow.com/a/246128
++# - To resolve finding the directory after symlinks
++SOURCE="${BASH_SOURCE[0]}"
++# resolve $SOURCE until the file is no longer a symlink
++while [ -h "$SOURCE" ]; do
++ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
++ SOURCE="$(readlink "$SOURCE")"
++ # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
++ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
++done
++DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
++
++CP=$( echo $DIR/../lib/*.jar . | sed 's/ /:/g')
++CP=$CP:$( echo $DIR/../ext/*.jar . | sed 's/ /:/g')
+
+ # Find Java
+ if [ "$JAVA_HOME" = "" ] ; then