Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit dffaeeba authored by Jonathan Schaeffer's avatar Jonathan Schaeffer
Browse files

Simplified syntax

ref #1
parent 581d0059
......@@ -174,7 +174,7 @@ fi
# Option ContinueFrom
#
####################
if [[ -f ${RESIFDD_CONTINUE_FROM_FILE} ]]; then
if [[ -r ${RESIFDD_CONTINUE_FROM_FILE} ]]; then
# Continue from previous report
echo "Recovery file $RESIFDD_CONTINUE_FROM_FILE exists"
cp $RESIFDD_CONTINUE_FROM_FILE $RESIFDD_WORKDIR/recovery.$$
......@@ -185,7 +185,7 @@ else
fi
# Header for the report :
IRODS_REPORT=reports/$(date +%Y-%m-%d).csv
IRODS_REPORT=reports/$(date +%Y%m%d-%H%M).csv
LOCAL_REPORT=$RESIFDD_WORKDIR/report.csv
format_report "Year_Network_Station" "Size(MB)" "Dumpdate" "Duration(s)" "Throughput(MB/s)" "Comment" > $LOCAL_REPORT
imkdir -p reports
......@@ -198,7 +198,7 @@ iput -f $LOCAL_REPORT $IRODS_REPORT
##################
KEY="validated-seismic-metadata"
if [ ! -z "${RECOVERY_FILE+x}" ] && egrep -q -e ".*($KEY ).*( OK | Skipped ).*" $RECOVERY_FILE ; then
if [[ -r $RECOVERY_FILE ]] && egrep -q -e ".*($KEY ).*( OK | Skipped ).*" $RECOVERY_FILE ; then
format_report $KEY "-" $(date +%Y-%m-%dT%H:%M:%S --date=@$start) "-" "-" "Skipped" >> $LOCAL_REPORT
else
# Get the snapshot name for this month
......@@ -245,7 +245,7 @@ for dir in $(find . -maxdepth 3 -type d | sort); do
NETWORK=${YNS[2]}
STATION=${YNS[3]}
# Test if in recovery mode, we should send or not
if [ ! -z "${RECOVERY_FILE+x}" ]; then
if [[ -r $RECOVERY_FILE ]]; then
if egrep -q -e ".*$YEAR.*$NETWORK.*$STATION.*( OK | Skipped ).*" $RECOVERY_FILE; then
echo "Found OK or skipped in $RECOVERY_FILE for $KEY. Skipping"
format_report $KEY "-" $(date +%Y-%m-%dT%H:%M:%S --date=@$start) "-" "-" "Skipped" >> $LOCAL_REPORT
......
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