class Osmosis < Formula desc "Command-line OpenStreetMap data processor" homepage "https://wiki.openstreetmap.org/wiki/Osmosis" url "https://bretth.dev.openstreetmap.org/osmosis-build/osmosis-0.45.zip" sha256 "d801f1a8806359efe95d604bb8a770294bca6fcaf32b50672d2891487b97c6d1" bottle :unneeded # need to adjust home dir for a clean install patch :DATA def install bin.install "bin/osmosis" libexec.install %w[lib config script] end test do path = testpath/"test.osm" path.write <<~EOS EOS system("#{bin}/osmosis", "--read-xml", "file=#{path}", "--write-null") end end __END__ --- a/bin/osmosis 2010-11-16 06:58:44.000000000 +0100 +++ b/bin/osmosis 2010-11-23 12:13:01.000000000 +0100 @@ -83,6 +83,7 @@ saveddir=`pwd` MYAPP_HOME=`dirname "$PRG"`/.. MYAPP_HOME=`cd "$MYAPP_HOME" && pwd` +MYAPP_HOME="$MYAPP_HOME/libexec" cd "$saveddir" # Build up the classpath of required jar files via classworlds launcher.