summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-20 07:59:05 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-20 07:59:05 +0000
commit22e5e36f6b7128be30b8c1a6946785a75865a2f1 (patch)
tree9d5567eebe34be5aba1ceb17d08490e966de26ce
parente872787e66d5914277484bac83515dd4da31bf40 (diff)
downloadchromium_src-22e5e36f6b7128be30b8c1a6946785a75865a2f1.zip
chromium_src-22e5e36f6b7128be30b8c1a6946785a75865a2f1.tar.gz
chromium_src-22e5e36f6b7128be30b8c1a6946785a75865a2f1.tar.bz2
Download clang-xxx.tgz into /tmp instead of the current directory.
BUG=96722 TEST=none Review URL: http://codereview.chromium.org/7931022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101931 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xtools/clang/scripts/update.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/clang/scripts/update.sh b/tools/clang/scripts/update.sh
index 66b5fb9..62f9698 100755
--- a/tools/clang/scripts/update.sh
+++ b/tools/clang/scripts/update.sh
@@ -110,18 +110,23 @@ if [ -z "$force_local_build" ]; then
# and goma relies on having matching binary hashes on client and server too.
CDS_URL=https://commondatastorage.googleapis.com/chromium-browser-clang
CDS_FILE="clang-${CLANG_REVISION}.tgz"
+ CDS_OUT_DIR=$(mktemp -d -t clang_download.XXXXXX)
+ CDS_OUTPUT="${CDS_OUT_DIR}/${CDS_FILE}"
echo Trying to download prebuilt clang
if [ "${OS}" = "Linux" ]; then
- wget "${CDS_URL}/Linux_x64/${CDS_FILE}" || rm -f "${CDS_FILE}"
+ wget "${CDS_URL}/Linux_x64/${CDS_FILE}" -O "${CDS_OUTPUT}" || \
+ rm -f "${CDS_OUT_DIR}"
elif [ "${OS}" = "Darwin" ]; then
- curl -L --fail -O "${CDS_URL}/Mac/${CDS_FILE}" || rm -f "${CDS_FILE}"
+ curl -L --fail "${CDS_URL}/Mac/${CDS_FILE}" -o "${CDS_OUTPUT}" || \
+ rm -f "${CDS_OUT_DIR}"
fi
- if [ -f "${CDS_FILE}" ]; then
+ if [ -f "${CDS_OUTPUT}" ]; then
rm -rf "${LLVM_BUILD_DIR}/Release+Asserts"
mkdir -p "${LLVM_BUILD_DIR}/Release+Asserts"
- tar -xzf "${CDS_FILE}" -C "${LLVM_BUILD_DIR}/Release+Asserts"
+ tar -xzf "${CDS_OUTPUT}" -C "${LLVM_BUILD_DIR}/Release+Asserts"
echo clang "${CLANG_REVISION}" unpacked
echo "${CLANG_REVISION}" > "${STAMP_FILE}"
+ rm -rf "${CDS_OUT_DIR}"
exit 0
else
echo Did not find prebuilt clang at r"${CLANG_REVISION}", building