Changeset 99c2c69e in mainline for tools/toolchain.sh


Ignore:
Timestamp:
2013-09-13T00:36:30Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
67fbd5e
Parents:
7f84430 (diff), 11d41be5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/toolchain.sh

    r7f84430 r99c2c69e  
    254254}
    255255
     256check_dirs() {
     257        OUTSIDE="$1"
     258        BASE="$2"
     259        ORIGINAL="`pwd`"
     260       
     261        cd "${OUTSIDE}"
     262        check_error $? "Unable to change directory to ${OUTSIDE}."
     263        ABS_OUTSIDE="`pwd`"
     264       
     265        cd "${BASE}"
     266        check_error $? "Unable to change directory to ${BASE}."
     267        ABS_BASE="`pwd`"
     268       
     269        cd "${ORIGINAL}"
     270        check_error $? "Unable to change directory to ${ORIGINAL}."
     271       
     272        BASE_LEN="${#ABS_BASE}"
     273        OUTSIDE_TRIM="${ABS_OUTSIDE:0:${BASE_LEN}}"
     274       
     275        if [ "${OUTSIDE_TRIM}" == "${ABS_BASE}" ] ; then
     276                echo
     277                echo "CROSS_PREFIX cannot reside within the working directory."
     278               
     279                exit 5
     280        fi
     281}
     282
    256283unpack_tarball() {
    257284        FILE="$1"
     
    306333        create_dir "${PREFIX}" "destination directory"
    307334        create_dir "${OBJDIR}" "GCC object directory"
     335       
     336        check_dirs "${PREFIX}" "${WORKDIR}"
    308337       
    309338        echo ">>> Unpacking tarballs"
Note: See TracChangeset for help on using the changeset viewer.