#!/bin/bash
# Purpose: removes preliminary data files from the past two weeks that already have an associated definitive file.
# Intended to be run regularly through cron.

aim_cips_data_directory=/aim/data/cips

# The following are for local Python source directories and libraries
if [ $HOSTNAME == 'aimcips' ]
    then
    export AIMPI_HOME=/export/home/aimpi
fi
if [ $HOSTNAME == 'aimcips2' ]
    then
    export AIMPI_HOME=/home/aimpi
fi
if [ $HOSTNAME == 'aimcips-gpu' ]
    then
    export AIMPI_HOME=/home/aimpi
fi
export PYTHONPATH=/aim/sds/cips/scripts:/aim/sds/common/scripts
export PYTHONPATH=$PYTHONPATH:$AIMPI_HOME/src/sqlite_utils:$AIMPI_HOME/src/utils

# drop prelim files that have matching definitive files
/aim/sds/cips/scripts/delete_superseded_pre_files.py

