A better way to tell if we have the right lib version.

master
dak180 2011-05-08 02:37:20 -04:00
parent fbb4c43d35
commit fb4cf44424
1 changed files with 10 additions and 3 deletions

View File

@ -36,10 +36,14 @@ elif [[ -d "${OutDir}" ]] && [[ ! -f "${FileName}" ]]; then
rm -fR "${DirectorY}" "${OutDir}" "${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}" "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}" "${TARGET_TEMP_DIR}"
elif [[ -d "${OutDir}" ]] && [[ -f "${FileName}" ]]; then
# Check to make sure we have the right file
MD5SumLoc=`md5 -q "${FileName}"`
MD5SumLoc=`cat "${OutDir}/.MD5SumLoc"`
if [ "${MD5SumLoc}" != "${MD5Sum}" ]; then
echo "error: Cached file is outdated or incorrect, removing" >&2
rm -fR "${FileName}" "${DirectorY}" "${OutDir}" "${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}" "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}" "${TARGET_TEMP_DIR}"
rm -fR "${DirectorY}" "${OutDir}" "${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}" "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}" "${TARGET_TEMP_DIR}"
MD5SumFle=`md5 -q "${FileName}"`
if [ "${MD5SumFle}" != "${MD5Sum}" ]; then
rm -fR "${FileName}"
fi
else
# Do not do more work then we have to
echo "${OutDir} already exists, skipping"
@ -87,13 +91,16 @@ else
exit 1
fi
# Save the sum
echo "${MD5SumLoc}" > "${DirectorY}/.MD5SumLoc"
# Move
if [ ! -d "${DirectorY}" ]; then
echo "error: Can't find ${DirectorY} to rename" >&2
exit 1
else
mv "${DirectorY}" "${OutDir}"
touch ${OutDir}/*
cd "${SRCROOT}"; xcodeindex; cd external
fi
exit 0