Commit 5ade3d6c by Maarten L. Hekkelman

Fixes in update data script

parent 0d8e548f
......@@ -1582,7 +1582,7 @@ void PDBFileParser::ParseTitle()
if (not iequals(key, "MOL_ID") and mCompounds.empty())
{
if (cif::VERBOSE >= 0)
if (cif::VERBOSE > 0)
std::cerr << "Ignoring invalid COMPND record" << std::endl;
break;
}
......
......@@ -30,12 +30,9 @@ fi
# Create a temp file in the right directory and
# make sure it is cleaned up when this script exits
tmpfile=$(mktemp --tmpdir=@CIFPP_CACHE_DIR@)
tmpfile=$(mktemp)
trap "rm -f \"${tmpfile}\"" EXIT
# Record if updating was really necessary
updated=false
update_dictionary() {
dict=$1
source=$2
......@@ -57,7 +54,7 @@ update_dictionary() {
cat > "${tmpfile}"
fi
) && (
mv "${tmpfile}" "${dict}" && chmod a+r "${dict}" && updated=true
mv "${tmpfile}" "${dict}" && chmod a+r "${dict}"
) || true
}
......@@ -69,6 +66,6 @@ update_dictionary "@CIFPP_CACHE_DIR@/mmcif_ma.dic" "https://github.com/ihmwg/Mod
# notify subscribers, will fail on FreeBSD
if [ "${updated}" != "false" ] && [ -d "@CIFPP_ETC_DIR@/libcifpp/cache-update.d" ] && [ -x /bin/run-parts ]; then
if [ -d "@CIFPP_ETC_DIR@/libcifpp/cache-update.d" ] && [ -x /bin/run-parts ]; then
run-parts --arg "@CIFPP_CACHE_DIR@" -- "@CIFPP_ETC_DIR@/libcifpp/cache-update.d"
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment