]> git.pld-linux.org Git - packages/openjdk9.git/blob - download.sh
adapterized
[packages/openjdk9.git] / download.sh
1 #!/bin/sh -e
2
3 tag="$1"
4
5 if [ -z "$tag" -a -x /usr/bin/rpm-specdump ] ; then
6         version=$(rpm-specdump openjdk8.spec | awk '/^h PACKAGE_VERSION/ { sub(/.b/, "-b", $3); print $3 }')
7         if [ -n "$version" ] ; then
8                 tag="jdk$version"
9                 echo "Using spec version: $tag"
10         fi
11 fi
12
13
14 if [ -z "$tag" -o "${tag#jdk8}" = "${tag}" ] ; then
15         echo "Usage:" >&2
16         echo "   $0 <tag>" >&2
17         echo "e.g:" >&2
18         echo "   $0 jdk8u66-b02" >&2
19         exit 1
20 fi
21
22 if [ "${tag#jdk8u}" != "${tag}" ] ; then
23         repo="jdk8u"
24 else
25         repo="jdk8"
26 fi
27
28 curl -o "openjdk8-${tag}.tar.bz2" "http://hg.openjdk.java.net/$repo/$repo/archive/${tag}.tar.bz2"
29
30 for component in corba hotspot jaxp jaxws jdk langtools nashorn ; do
31         curl -o "openjdk8-${component}-${tag}.tar.bz2" "http://hg.openjdk.java.net/$repo/$repo/${component}/archive/${tag}.tar.bz2"
32 done
This page took 0.061342 seconds and 3 git commands to generate.