mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
* 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
This commit is contained in:
parent
939ba32747
commit
0307a76def
@ -11,31 +11,31 @@
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
readonly REV="${1:-HEAD}"
|
readonly LLVM_PROJECT_SVN="http://llvm.org/svn/llvm-project"
|
||||||
|
|
||||||
runOnModule() {
|
getLatestRevisionFromSVN() {
|
||||||
|
svn info ${LLVM_PROJECT_SVN} | egrep ^Revision | sed 's/^Revision: //'
|
||||||
|
}
|
||||||
|
|
||||||
|
readonly REV="${1:-$(getLatestRevisionFromSVN)}"
|
||||||
|
|
||||||
|
createTarballFromSVN() {
|
||||||
local module=$1
|
local module=$1
|
||||||
local log="${module}.log"
|
local log="${module}.log"
|
||||||
echo "Running: svn co -r ${REV} ${module}; log in ${log}"
|
echo "Running: svn export -r ${REV} ${module}; log in ${log}"
|
||||||
svn co -r ${REV} http://llvm.org/svn/llvm-project/${module}/trunk ${module} \
|
svn -q export -r ${REV} ${LLVM_PROJECT_SVN}/${module}/trunk \
|
||||||
> ${log} 2>&1
|
${module} > ${log} 2>&1
|
||||||
|
|
||||||
# Delete all the ".svn" dirs; they take quite a lot of space.
|
|
||||||
echo "Cleaning up .svn dirs"
|
|
||||||
find ${module} -type d -name \.svn -print0 | xargs -0 /bin/rm -rf
|
|
||||||
|
|
||||||
# Create "module-revision.tar.bz2" packages from the SVN checkout dirs.
|
# Create "module-revision.tar.bz2" packages from the SVN checkout dirs.
|
||||||
local revision=$(grep "Checked out revision" ${log} | \
|
local tarball="${module}-${REV}.tar.bz2"
|
||||||
sed 's/[^0-9]\+\([0-9]\+\)[^0-9]\+/\1/')
|
|
||||||
local tarball="${module}-${revision}.tar.bz2"
|
|
||||||
echo "Creating tarball: ${tarball}"
|
echo "Creating tarball: ${tarball}"
|
||||||
tar cjf ${tarball} ${module}
|
tar cjf ${tarball} ${module}
|
||||||
|
|
||||||
echo "Cleaning SVN checkout dir ${module}"
|
echo "Cleaning up '${module}'"
|
||||||
rm -rf ${module} ${log}
|
rm -rf ${module} ${log}
|
||||||
}
|
}
|
||||||
|
|
||||||
for module in "llvm" "llvm-gcc-4.2"; do
|
for module in "llvm" "llvm-gcc-4.2"; do
|
||||||
runOnModule ${module}
|
createTarballFromSVN ${module}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user