[MinGW] [X86] Add stubs for references to data variables that might end up imported...
[llvm-complete.git] / utils / release / export.sh
blobd978055f01837834fbf58c94340077b8f8688e39
1 #!/bin/sh
2 #===-- tag.sh - Tag the LLVM release candidates ----------------------------===#
4 # The LLVM Compiler Infrastructure
6 # This file is distributed under the University of Illinois Open Source
7 # License.
9 #===------------------------------------------------------------------------===#
11 # Create branches and release candidates for the LLVM release.
13 #===------------------------------------------------------------------------===#
15 set -e
17 projects="llvm cfe test-suite compiler-rt libcxx libcxxabi clang-tools-extra polly lldb lld openmp libunwind"
18 base_url="https://llvm.org/svn/llvm-project"
20 release=""
21 rc=""
23 usage() {
24 echo "Export the SVN sources and build tarballs from them"
25 echo "usage: `basename $0`"
26 echo " "
27 echo " -release <num> The version number of the release"
28 echo " -rc <num> The release candidate number"
29 echo " -final The final tag"
32 export_sources() {
33 release_no_dot=`echo $release | sed -e 's,\.,,g'`
34 tag_dir="tags/RELEASE_$release_no_dot/$rc"
36 if [ "$rc" = "final" ]; then
37 rc=""
40 for proj in $projects; do
41 echo "Exporting $proj ..."
42 svn export \
43 $base_url/$proj/$tag_dir \
44 $proj-$release$rc.src
46 echo "Creating tarball ..."
47 tar cfJ $proj-$release$rc.src.tar.xz $proj-$release$rc.src
48 done
51 while [ $# -gt 0 ]; do
52 case $1 in
53 -release | --release )
54 shift
55 release=$1
57 -rc | --rc )
58 shift
59 rc="rc$1"
61 -final | --final )
62 rc="final"
64 -h | -help | --help )
65 usage
66 exit 0
68 * )
69 echo "unknown option: $1"
70 usage
71 exit 1
73 esac
74 shift
75 done
77 if [ "x$release" = "x" ]; then
78 echo "error: need to specify a release version"
79 exit 1
82 # Make sure umask is not overly restrictive.
83 umask 0022
85 export_sources
86 exit 0