| Index: tools/clang/scripts/update.sh
|
| diff --git a/tools/clang/scripts/update.sh b/tools/clang/scripts/update.sh
|
| index dd6f089dc0a20aca68c1e7d837344a1398c7cd90..2e0f0d0d78b702c6202fa4d438dea8f9ebf2c240 100755
|
| --- a/tools/clang/scripts/update.sh
|
| +++ b/tools/clang/scripts/update.sh
|
| @@ -56,10 +56,10 @@ set -eu
|
|
|
|
|
| if [[ -n ${LLVM_FORCE_HEAD_REVISION:-''} ]]; then
|
| - # Use a real version number rather than HEAD to make sure that
|
| - # --print-revision, stamp file logic, etc. all works naturally.
|
| + # Use a real revision number rather than HEAD to make sure that the stamp file
|
| + # logic works.
|
| CLANG_REVISION=$(svn info "$LLVM_REPO_URL" \
|
| - | grep 'Last Changed Rev' | awk '{ printf $4; }')
|
| + | grep 'Revision:' | awk '{ printf $2; }')
|
| PACKAGE_VERSION="${CLANG_REVISION}-0"
|
| fi
|
|
|
| @@ -91,7 +91,11 @@ while [[ $# > 0 ]]; do
|
| force_local_build=yes
|
| ;;
|
| --print-revision)
|
| - echo $PACKAGE_VERSION
|
| + if [[ -n ${LLVM_FORCE_HEAD_REVISION:-''} ]]; then
|
| + svn info "$LLVM_DIR" | grep 'Revision:' | awk '{ printf $2; }'
|
| + else
|
| + echo $PACKAGE_VERSION
|
| + fi
|
| exit 0
|
| ;;
|
| --run-tests)
|
|
|