homebrew-core/Formula/geoserver.rb
ilovezfs da0eaf7517 geoserver 2.9.0
Closes #2287.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-06-22 08:25:20 -07:00

30 lines
787 B
Ruby

class Geoserver < Formula
desc "Java server to share and edit geospatial data"
homepage "http://geoserver.org/"
url "https://downloads.sourceforge.net/project/geoserver/GeoServer/2.9.0/geoserver-2.9.0-bin.zip"
sha256 "169c3f801ee338d1f05573123c0f918aeb7b808e1836fd1b43aeaad46630a9a8"
bottle :unneeded
def install
libexec.install Dir["*"]
(bin/"geoserver").write <<-EOS.undent
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: $ geoserver path/to/data/dir"
else
cd "#{libexec}" && java -DGEOSERVER_DATA_DIR=$1 -jar start.jar
fi
EOS
end
def caveats; <<-EOS.undent
To start geoserver:
geoserver path/to/data/dir
EOS
end
test do
assert_match /geoserver path/, shell_output("#{bin}/geoserver")
end
end