diff options
author | Jim Huang <jim.huang@linaro.org> | 2011-04-07 20:03:42 +0800 |
---|---|---|
committer | Jim Huang <jim.huang@linaro.org> | 2011-04-07 20:03:42 +0800 |
commit | 54c2348db2c90908b39f33fab4707741f661d31c (patch) | |
tree | 7c26fd404d3de7d3d5d4b59fb99b06b24dec9338 | |
parent | 2397435f861c8c428c4d01fb31be7c099bb1a5a7 (diff) | |
download | build-54c2348db2c90908b39f33fab4707741f661d31c.tar.gz |
linaro-build: Improve the location for apply patches
-rwxr-xr-x | linaro-build.sh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/linaro-build.sh b/linaro-build.sh index d492792..32c1261 100755 --- a/linaro-build.sh +++ b/linaro-build.sh @@ -201,18 +201,19 @@ for package in ${!ARG_WITH*}; do done if [ "x${ARG_APPLY_PATCH}" = "xyes" ]; then - note "Will apply patches in toolchain/gcc-patches/${ARG_LINARO_GCC_VER}" - cd ${ARG_TOOLCHAIN_SRC_DIR}/gcc/${ARG_LINARO_GCC_SRC_DIR} - for FILE in `ls ${ARG_TOOLCHAIN_SRC_DIR}/gcc-patches/${ARG_LINARO_GCC_VER} 2>/dev/null` ; do + sub_gcc_ver="`echo ${ARG_LINARO_GCC_VER} | grep -o '4\.\([5-9]\|[1-9][0-9]\)'`" + note "Will apply patches in toolchain/gcc-patches/${sub_gcc_ver}" + cd ${ARG_TOOLCHAIN_SRC_DIR}/gcc/${ARG_LINARO_GCC_SRC_DIR} && + for FILE in `ls ${ARG_TOOLCHAIN_SRC_DIR}/gcc-patches/${sub_gcc_ver} 2>/dev/null` ; do if [ ! -f ${FILE}-patch.log ]; then - note "Applying patch ${FILE}" - git apply ${ARG_TOOLCHAIN_SRC_DIR}/gcc-patches/${ARG_LINARO_GCC_VER}/${FILE} 2>&1 | tee "${FILE}-patch.log" + note "Apply patch: ${FILE}" + git apply ${ARG_TOOLCHAIN_SRC_DIR}/gcc-patches/${sub_gcc_ver}/${FILE} 2>&1 | \ + tee "${FILE}-patch.log" fi done cd - fi - if [ x"${ARG_WITH_GCC}" != x"" ]; then BUILD_WITH_GCC="--with-gcc-version=${ARG_LINARO_GCC_VER}" fi |