diff --git a/sbin/dm_install_support.sh b/sbin/dm_install_support.sh new file mode 100755 index 0000000000000000000000000000000000000000..549164fd427800d0f17b422f795d56afd4a228c3 --- /dev/null +++ b/sbin/dm_install_support.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +DM_SVN_URL=https://subversion.xray.aps.anl.gov/DataManagement + +MY_DIR=`dirname $0` && cd $MY_DIR && MY_DIR=`pwd` +if [ -z "${DM_ROOT_DIR}" ]; then + DM_ROOT_DIR=$MY_DIR/.. +fi +DM_SUPPORT_DIR=$DM_ROOT_DIR/../support +DM_DATA_DIR=$DM_ROOT_DIR/../data + +execute() { + echo "Executing: $@" + eval "$@" +} + +if [ ! -d $DM_SUPPORT_DIR ]; then + echo "Creating new DM support directory $DM_SUPPORT_DIR." + cd `dirname $DM_SUPPORT_DIR` + execute svn co $DM_SVN_URL/support support +fi +cd $DM_SUPPORT_DIR +execute svn update +execute $DM_SUPPORT_DIR/bin/clean_all.sh +execute $DM_SUPPORT_DIR/bin/install_all.sh + +if [ ! -d $DM_DATA_DIR ]; then + echo "Creating data directory" + mkdir -p "$DM_DATA_DIR" +fi + + +