#!/bin/sh
#
# Shell for building necessary scheduler libraries
#
# Version: $Id: build,v 1.4 2006/03/15 11:11:03 gwin Exp $
#
# Check that DNAHOME is defined.
# 
#
if [ -z "$DNAHOME" ]; then
  echo "ERROR: DNAHOME not defined."
  exit 1
fi
#
# Make sure we're in the right directory.
#
cd $DNAHOME/scheduler
echo "Building scheduler Python modules."
rm -rf build_log
echo "Build log file: $DNAHOME/scheduler/build_log"
#
# Cleaning previously installed components.
#
# rm -rf lib
# mkdir -p lib
#
# Build the DiffractionImage Python module.
#
cd DiffractionImage/src
echo "Now building the DiffractionImage module"
python setup.py build_ext --inplace -f > $DNAHOME/scheduler/build_log 2>&1 
cp DiffractionImage.so $DNAHOME/scheduler/DiffractionImage/lib
echo "DiffractionImage module built."
