From a0e5b553ef9bb64033ca41f519ffa71b151dcfa3 Mon Sep 17 00:00:00 2001 From: Takeo Sawada Date: Mon, 21 Feb 2022 17:33:27 +0900 Subject: [PATCH] launcher: debian package to depend on curl | wget also give informative error message when neither is available --- launcher-package/build.sbt | 2 +- sbt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/launcher-package/build.sbt b/launcher-package/build.sbt index ddfdb1f9f..b621c7695 100755 --- a/launcher-package/build.sbt +++ b/launcher-package/build.sbt @@ -191,7 +191,7 @@ val root = (project in file(".")). }, // Used to have "openjdk-8-jdk" but that doesn't work on Ubuntu 14.04 https://github.com/sbt/sbt/issues/3105 // before that we had java6-runtime-headless" and that was pulling in JDK9 on Ubuntu 16.04 https://github.com/sbt/sbt/issues/2931 - debianPackageDependencies in Debian ++= Seq("bash (>= 3.2)"), + debianPackageDependencies in Debian ++= Seq("bash (>= 3.2)", "curl | wget"), debianPackageRecommends in Debian += "git", linuxPackageMappings in Debian += { val bd = sourceDirectory.value diff --git a/sbt b/sbt index 218f45141..9d04b2deb 100755 --- a/sbt +++ b/sbt @@ -123,6 +123,9 @@ download_url () { curl --silent -L "$url" --output "$jar" elif command -v wget > /dev/null; then wget --quiet -O "$jar" "$url" + else + echoerr "failed to download $url: Neither curl nor wget is avaialble" + exit 2 fi } && [[ -f "$jar" ]] }