llvm.org GIT mirror llvm / 0307a76
* Use "svn export" instead of "svn co" and avoid cleaning up .svn dirs * Use "svn info" to get last revision in repo, will get matching tarballs * Now run "svn -q" since "svn info" tells us the revision number git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78065 91177308-0d34-0410-b5e6-96231b3b80d8 Misha Brukman 11 years ago
1 changed file(s) with 14 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
1010 set -o nounset
1111 set -o errexit
1212
13 readonly REV="${1:-HEAD}"
13 readonly LLVM_PROJECT_SVN="http://llvm.org/svn/llvm-project"
1414
15 runOnModule() {
15 getLatestRevisionFromSVN() {
16 svn info ${LLVM_PROJECT_SVN} | egrep ^Revision | sed 's/^Revision: //'
17 }
18
19 readonly REV="${1:-$(getLatestRevisionFromSVN)}"
20
21 createTarballFromSVN() {
1622 local module=$1
1723 local log="${module}.log"
18 echo "Running: svn co -r ${REV} ${module}; log in ${log}"
19 svn co -r ${REV} http://llvm.org/svn/llvm-project/${module}/trunk ${module} \
20 > ${log} 2>&1
21
22 # Delete all the ".svn" dirs; they take quite a lot of space.
23 echo "Cleaning up .svn dirs"
24 find ${module} -type d -name \.svn -print0 | xargs -0 /bin/rm -rf
24 echo "Running: svn export -r ${REV} ${module}; log in ${log}"
25 svn -q export -r ${REV} ${LLVM_PROJECT_SVN}/${module}/trunk \
26 ${module} > ${log} 2>&1
2527
2628 # Create "module-revision.tar.bz2" packages from the SVN checkout dirs.
27 local revision=$(grep "Checked out revision" ${log} | \
28 sed 's/[^0-9]\+\([0-9]\+\)[^0-9]\+/\1/')
29 local tarball="${module}-${revision}.tar.bz2"
29 local tarball="${module}-${REV}.tar.bz2"
3030 echo "Creating tarball: ${tarball}"
3131 tar cjf ${tarball} ${module}
3232
33 echo "Cleaning SVN checkout dir ${module}"
33 echo "Cleaning up '${module}'"
3434 rm -rf ${module} ${log}
3535 }
3636
3737 for module in "llvm" "llvm-gcc-4.2"; do
38 runOnModule ${module}
38 createTarballFromSVN ${module}
3939 done
4040