2013-03-12 13:35:26 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2013-09-05 18:19:24 +00:00
|
|
|
# Generates the 'source tarball' for JDK 8 projects.
|
|
|
|
#
|
|
|
|
# Usage: generate_source_tarball.sh repo_name tag
|
|
|
|
#
|
|
|
|
# Examples:
|
|
|
|
# ./generate_source_tarball.sh jdk8 jdk8-b79
|
|
|
|
# ./generate_source_tarball.sh aarch64-port aarch64-${DATE}
|
|
|
|
#
|
|
|
|
# This script creates a single source tarball out of the repository
|
|
|
|
# based on the given tag and removes code not allowed in fedora.
|
|
|
|
|
2013-07-23 08:59:21 +00:00
|
|
|
set -e
|
|
|
|
|
2013-09-05 18:19:24 +00:00
|
|
|
REPO_NAME="$1"
|
|
|
|
VERSION="$2"
|
2013-07-21 17:35:12 +00:00
|
|
|
JDK8_URL=http://hg.openjdk.java.net
|
2013-03-12 13:35:26 +00:00
|
|
|
|
2013-09-05 18:19:24 +00:00
|
|
|
if [[ "${REPO_NAME}" = "" ]] ; then
|
|
|
|
echo "No repository specified."
|
|
|
|
exit -1
|
|
|
|
fi
|
|
|
|
if [[ "${VERSION}" = "" ]]; then
|
|
|
|
echo "No version/tag specified."
|
2013-03-12 13:35:26 +00:00
|
|
|
exit -1;
|
|
|
|
fi
|
|
|
|
|
2013-09-05 18:19:24 +00:00
|
|
|
mkdir "${REPO_NAME}"
|
|
|
|
pushd "${REPO_NAME}"
|
|
|
|
|
|
|
|
REPO_ROOT="${JDK8_URL}/${REPO_NAME}/jdk8"
|
|
|
|
|
|
|
|
wget "${REPO_ROOT}/archive/${VERSION}.tar.gz"
|
|
|
|
tar xf "${VERSION}.tar.gz"
|
|
|
|
rm "${VERSION}.tar.gz"
|
|
|
|
|
|
|
|
mv "jdk8-${VERSION}" jdk8
|
|
|
|
pushd jdk8
|
|
|
|
|
|
|
|
for subrepo in corba hotspot jdk jaxws jaxp langtools nashorn
|
2013-07-23 08:59:21 +00:00
|
|
|
do
|
2013-09-05 18:19:24 +00:00
|
|
|
wget "${REPO_ROOT}/${subrepo}/archive/${VERSION}.tar.gz"
|
|
|
|
tar xf "${VERSION}.tar.gz"
|
|
|
|
rm "${VERSION}.tar.gz"
|
|
|
|
mv "${subrepo}-${VERSION}" "${subrepo}"
|
2013-07-21 17:35:12 +00:00
|
|
|
done
|
2013-09-05 18:19:24 +00:00
|
|
|
|
|
|
|
rm -vr jdk/src/share/native/sun/security/ec/impl
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
tar cJf ${REPO_NAME}-${VERSION}.tar.xz jdk8
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
mv "${REPO_NAME}/${REPO_NAME}-${VERSION}.tar.xz" .
|