Make the FetchPrebuilt script smarter about replacing incorrect tarballs.
parent
fad926f03b
commit
fa67c45c0d
|
@ -35,13 +35,17 @@ elif [ -d "prebuilt/${DirectorY}" ]; then
|
|||
elif [[ -d "external/${OutDir}" ]] && [[ ! -f "prebuilt/${FileName}" ]]; then
|
||||
# Clean up when updating versions
|
||||
echo "warning: Cached file is outdated or incomplete, removing" >&2
|
||||
rm -fR "prebuilt/${DirectorY}" "external/${OutDir}" "${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}" "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}" "${TARGET_TEMP_DIR}"
|
||||
rm -fR "prebuilt/${DirectorY}" "external/${OutDir}"
|
||||
elif [[ -d "external/${OutDir}" ]] && [[ -f "prebuilt/${FileName}" ]]; then
|
||||
# Check to make sure we have the right file
|
||||
MD5SumLoc=`md5 -q "prebuilt/${FileName}"`
|
||||
MD5SumLoc=`cat "external/${OutDir}/.MD5SumLoc" 2>/dev/null || echo ""`
|
||||
if [ "${MD5SumLoc}" != "${MD5Sum}" ]; then
|
||||
echo "warning: Cached file is outdated or incorrect, removing" >&2
|
||||
rm -fR "prebuilt/${FileName}" "prebuilt/${DirectorY}" "external/${OutDir}" "${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}" "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}" "${TARGET_TEMP_DIR}"
|
||||
rm -fR "prebuilt/${DirectorY}" "external/${OutDir}"
|
||||
MD5SumFle=`md5 -q "prebuilt/${FileName}"`
|
||||
if [ "${MD5SumFle}" != "${MD5Sum}" ]; then
|
||||
rm -fR "prebuilt/${FileName}"
|
||||
fi
|
||||
else
|
||||
# Do not do more work then we have to
|
||||
echo "${OutDir} already exists, skipping"
|
||||
|
@ -79,6 +83,9 @@ if ! tar -xzf "${FileName}"; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Save the sum
|
||||
echo "${MD5SumLoc}" > "${DirectorY}/.MD5SumLoc"
|
||||
|
||||
# Move
|
||||
if [ ! -d "${DirectorY}" ]; then
|
||||
echo "error: Can't find $DirectorY to rename" >&2
|
||||
|
|
|
@ -36,7 +36,7 @@ elif [[ -d "${OutDir}" ]] && [[ ! -f "${FileName}" ]]; then
|
|||
rm -fR "${DirectorY}" "${OutDir}"
|
||||
elif [[ -d "${OutDir}" ]] && [[ -f "${FileName}" ]]; then
|
||||
# Check to make sure we have the right file
|
||||
MD5SumLoc=`cat "${OutDir}/.MD5SumLoc"`
|
||||
MD5SumLoc=`cat "${OutDir}/.MD5SumLoc" 2>/dev/null || echo ""`
|
||||
if [ "${MD5SumLoc}" != "${MD5Sum}" ]; then
|
||||
echo "warning: Cached file is outdated or incorrect, removing" >&2
|
||||
rm -fR "${DirectorY}" "${OutDir}"
|
||||
|
|
|
@ -105,7 +105,7 @@ fi
|
|||
cd ../../
|
||||
echo "Copying the app cleanly."
|
||||
rm -r -f $dmgout/Warzone.app
|
||||
if ! tar -c --exclude '*.svg' --exclude 'Makefile*' --exclude 'makefile*' --exclude '.DS_Store' -C "${CONFIGURATION_BUILD_DIR}" Warzone.app | tar -xC $dmgout; then
|
||||
if ! tar -c --exclude '*.svg' --exclude 'Makefile*' --exclude 'makefile*' --exclude '.DS_Store' --exclude '.MD5SumLoc' -C "${CONFIGURATION_BUILD_DIR}" Warzone.app | tar -xC $dmgout; then
|
||||
echo "error: Unable to copy the app" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue