Skip to content
Snippets Groups Projects
Commit edf6717d authored by Tom Stellard's avatar Tom Stellard
Browse files

export.sh: Fetch sources from GitHub instead of SVN

Reviewers: hansw, jdoerfert

Subscribers: sylvestre.ledru, mgorny, hans, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70460
parent 198fbcb8
No related branches found
No related tags found
No related merge requests found
...@@ -13,14 +13,13 @@ ...@@ -13,14 +13,13 @@
set -e set -e
projects="llvm cfe test-suite compiler-rt libcxx libcxxabi clang-tools-extra polly lldb lld openmp libunwind" projects="llvm clang test-suite compiler-rt libcxx libcxxabi clang-tools-extra polly lldb lld openmp libunwind"
base_url="https://llvm.org/svn/llvm-project"
release="" release=""
rc="" rc=""
usage() { usage() {
echo "Export the SVN sources and build tarballs from them" echo "Export the Git sources and build tarballs from them"
echo "usage: `basename $0`" echo "usage: `basename $0`"
echo " " echo " "
echo " -release <num> The version number of the release" echo " -release <num> The version number of the release"
...@@ -30,20 +29,34 @@ usage() { ...@@ -30,20 +29,34 @@ usage() {
export_sources() { export_sources() {
release_no_dot=`echo $release | sed -e 's,\.,,g'` release_no_dot=`echo $release | sed -e 's,\.,,g'`
tag_dir="tags/RELEASE_$release_no_dot/$rc" tag="llvmorg-$release"
if [ "$rc" = "final" ]; then if [ "$rc" = "final" ]; then
rc="" rc=""
else
tag="$tag-$rc"
fi fi
for proj in $projects; do llvm_src_dir=llvm-project-$release$rc
echo "Exporting $proj ..." mkdir -p $llvm_src_dir
svn export \
$base_url/$proj/$tag_dir \ echo $tag
$proj-$release$rc.src echo "Fetching LLVM project source ..."
curl -L https://github.com/llvm/llvm-project/archive/$tag.tar.gz | \
tar -C $llvm_src_dir --strip-components=1 -xzf -
echo "Creating tarball for llvm-project ..."
tar -cJf llvm-project-$release$rc.tar.xz $llvm_src_dir
echo "Creating tarball ..." echo "Fetching LLVM test-suite source ..."
tar cfJ $proj-$release$rc.src.tar.xz $proj-$release$rc.src mkdir -p $llvm_src_dir/test-suite
curl -L https://github.com/llvm/test-suite/archive/$tag.tar.gz | \
tar -C $llvm_src_dir/test-suite --strip-components=1 -xzf -
for proj in $projects; do
echo "Creating tarball for $proj ..."
mv $llvm_src_dir/$proj $llvm_src_dir/$proj-$release$rc.src
tar -C $llvm_src_dir -cJf $proj-$release$rc.src.tar.xz $proj-$release$rc.src
done done
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment