mirror of https://github.com/sbt/sbt.git
launcher: debian package to depend on curl | wget
also give informative error message when neither is available
This commit is contained in:
parent
50c3cf1082
commit
a0e5b553ef
|
|
@ -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
|
// 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
|
// 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",
|
debianPackageRecommends in Debian += "git",
|
||||||
linuxPackageMappings in Debian += {
|
linuxPackageMappings in Debian += {
|
||||||
val bd = sourceDirectory.value
|
val bd = sourceDirectory.value
|
||||||
|
|
|
||||||
3
sbt
3
sbt
|
|
@ -123,6 +123,9 @@ download_url () {
|
||||||
curl --silent -L "$url" --output "$jar"
|
curl --silent -L "$url" --output "$jar"
|
||||||
elif command -v wget > /dev/null; then
|
elif command -v wget > /dev/null; then
|
||||||
wget --quiet -O "$jar" "$url"
|
wget --quiet -O "$jar" "$url"
|
||||||
|
else
|
||||||
|
echoerr "failed to download $url: Neither curl nor wget is avaialble"
|
||||||
|
exit 2
|
||||||
fi
|
fi
|
||||||
} && [[ -f "$jar" ]]
|
} && [[ -f "$jar" ]]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue