homebrew-core/Formula/geoserver.rb
Caleb Xu d56031c7e7 geoserver 2.15.2
Closes #42157.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
2019-07-19 14:40:09 +02:00

30 lines
773 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.15.2/geoserver-2.15.2-bin.zip"
sha256 "16019cf0a38e1bda7786e9ec54a507b7f91f291bd2f356e44dbbb50f7d8348f5"
bottle :unneeded
def install
libexec.install Dir["*"]
(bin/"geoserver").write <<~EOS
#!/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
To start geoserver:
geoserver path/to/data/dir
EOS
end
test do
assert_match "geoserver path", shell_output("#{bin}/geoserver")
end
end