Commit b142967f authored by Matteo Quintiliani's avatar Matteo Quintiliani

Substitude part of script by new feature of nmxptool, option -o


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@1163 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent 1bc5b0e8
...@@ -44,6 +44,9 @@ JDAY=$6 ...@@ -44,6 +44,9 @@ JDAY=$6
JDAY=`echo $6 | sed -e "s/^[0]*//"` JDAY=`echo $6 | sed -e "s/^[0]*//"`
OVERRIDE=$7 OVERRIDE=$7
# OVERRIDE IS TEMPORARY DISABLED
OVERRIDE=n
if [ $JDAY -le 0 ]; then if [ $JDAY -le 0 ]; then
export TODAY=$(date "+%j" | sed -e "s/^[0]*//") export TODAY=$(date "+%j" | sed -e "s/^[0]*//")
export JDAY=$(( $TODAY + $JDAY )) export JDAY=$(( $TODAY + $JDAY ))
...@@ -122,20 +125,20 @@ if [ -f ${FILEARCH} ]; then ...@@ -122,20 +125,20 @@ if [ -f ${FILEARCH} ]; then
fi fi
if [ $RUNNMXP == "y" ]; then if [ $RUNNMXP == "y" ]; then
$NMXPTOOL -H $NMXPHOST -m -C ${NET}.${STA}.${CHAN} -s ${YEAR}.${JDAY},00:00:00.0000 -e ${YEAR}.${JDAY},23:59:59.9999 $NMXPTOOL -H $NMXPHOST -m -C ${NET}.${STA}.${CHAN} -s ${YEAR}.${JDAY},00:00:00.0000 -e ${YEAR}.${JDAY},23:59:59.9999 -o ${DIRARCHIVESDS}
NMXPFILEARCH=${NET}.${STA}.${CHAN}_${YEAR}.${JDAY}.00.00.00.0000_${YEAR}.${JDAY}.23.59.59.9999.miniseed # NMXPFILEARCH=${NET}.${STA}.${CHAN}_${YEAR}.${JDAY}.00.00.00.0000_${YEAR}.${JDAY}.23.59.59.9999.miniseed
if [ -f $NMXPFILEARCH ]; then # if [ -f $NMXPFILEARCH ]; then
FILENMXPARCHSIZE=`stat -c %s ${NMXPFILEARCH}` # FILENMXPARCHSIZE=`stat -c %s ${NMXPFILEARCH}`
if [ $FILENMXPARCHSIZE -le 0 ]; then # if [ $FILENMXPARCHSIZE -le 0 ]; then
echo "WARNING: ${NMXPFILEARCH} is empty! It will not be saved!" # echo "WARNING: ${NMXPFILEARCH} is empty! It will not be saved!"
rm -f $NMXPFILEARCH # rm -f $NMXPFILEARCH
else # else
echo "Moving ${NMXPFILEARCH} to ${FILEARCH} ... " # echo "Moving ${NMXPFILEARCH} to ${FILEARCH} ... "
mkdir -p `dirname ${FILEARCH}` # mkdir -p `dirname ${FILEARCH}`
mv -f ${NMXPFILEARCH} ${FILEARCH} # mv -f ${NMXPFILEARCH} ${FILEARCH}
fi # fi
else # else
echo "ERROR: ${NMXPFILEARCH} has not been created by nmxptool." # echo "ERROR: ${NMXPFILEARCH} has not been created by nmxptool."
fi # fi
fi 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