Commit 92a836ec by Maarten L. Hekkelman

More location fixes

parent c88a46f1
......@@ -428,7 +428,13 @@ endif()
# Optionally install the update scripts for CCD and dictionary files
if(CIFPP_INSTALL_UPDATE_SCRIPT)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(CIFPP_CRON_DIR "${CIFPP_ETC_DIR}/cron.weekly")
elseif(UNIX) # assume all others are like FreeBSD...
set(CIFPP_CRON_DIR "${CIFPP_ETC_DIR}/periodic/weekly")
else()
message(FATAL_ERROR "Don't know where to install the update script")
endif()
configure_file(${PROJECT_SOURCE_DIR}/tools/update-libcifpp-data.in update-libcifpp-data @ONLY)
install(
......
#!/bin/bash
#!/bin/sh
set -e
......@@ -7,8 +7,8 @@ if [ "$EUID" -ne 0 ]
exit
fi
if [ -f @CIFPP_ETC_DIR@/libcifpp.conf ] ; then
. @CIFPP_ETC_DIR@/libcifpp.conf
if [ -f "@CIFPP_ETC_DIR@/libcifpp.conf" ] ; then
. "@CIFPP_ETC_DIR@/libcifpp.conf"
fi
# check to see if we're supposed to run at all
......@@ -17,7 +17,7 @@ if [ "$update" != "true" ] ; then
fi
# if cache directory doesn't exist, exit.
if ! [ -d @CIFPP_CACHE_DIR@ ]; then
if ! [ -d "@CIFPP_CACHE_DIR@" ]; then
exit
fi
......@@ -46,10 +46,10 @@ fetch_dictionary () {
fetch_dictionary "@CIFPP_CACHE_DIR@/mmcif_pdbx.dic" "https://mmcif.wwpdb.org/dictionaries/ascii/mmcif_pdbx_v50.dic.gz"
fetch_dictionary "@CIFPP_CACHE_DIR@/components.cif" "ftp://ftp.wwpdb.org/pub/pdb/data/monomers/components.cif.gz"
# notify subscribers
# notify subscribers, will fail on FreeBSD
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
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
wget -O/var/cache/libcifpp/mmcif_ma.dic "https://github.com/ihmwg/ModelCIF/raw/master/dist/mmcif_ma.dic"
wget -O"@CIFPP_CACHE_DIR@/mmcif_ma.dic" "https://github.com/ihmwg/ModelCIF/raw/master/dist/mmcif_ma.dic"
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