From 2de351f769c874e545a2f042ad7a82cb36301ccf Mon Sep 17 00:00:00 2001 From: Stefano Zampieri Date: Sun, 20 Oct 2024 11:19:24 +0200 Subject: [PATCH] add esotk static data --- Formula/esopipe-esotk.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Formula/esopipe-esotk.rb diff --git a/Formula/esopipe-esotk.rb b/Formula/esopipe-esotk.rb new file mode 100644 index 0000000..4390147 --- /dev/null +++ b/Formula/esopipe-esotk.rb @@ -0,0 +1,24 @@ +class EsopipeEsotk < Formula + desc "ESO ESOTK instrument pipeline (static data)" + homepage "https://www.eso.org/sci/software/pipelines/" + url "https://ftp.eso.org/pub/dfs/pipelines/instruments/esotk/esotk-kit-0.9.7-1.tar.gz" + sha256 "2d2db2d352b146b1f7c683cd1ee107bb5275e597ef412474ac4d39163fb6ce36" + license "GPL-2.0-or-later" + + livecheck do + url :homepage + regex(/href=.*?esotk-kit-(\d+(?:[.-]\d+)+)\.t/i) + end + + depends_on "esopipe-esotk-recipes" + + def install + version_norevision = version.to_s[/(\d+(?:[.]\d+)+)/i, 1] + system "tar", "xf", "esotk-calib-#{version_norevision}.tar.gz" + (prefix/"share/esopipes/datastatic/esotk-#{version_norevision}").install Dir["esotk-calib-#{version_norevision}/cal/*"] + end + + test do + system "true" + end +end