File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
shared-opt-dir/agency-parser Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -108,12 +108,14 @@ if [[ "$GTFS_DIR_COUNT" -gt 0 ]]; then
108
108
echo " - GTFS is entirely inside the new ZIP > REMOVE" ;
109
109
rm -r " $GTFS_DIR " ;
110
110
checkResult $? ;
111
- elif [[ " $GTFS_DIR_START_DATE " -lt " $YESTERDAY " && " $GTFS_DIR_END_DATE " -le " $END_DATE " ]]; then
112
- echo " - GTFS (after $YESTERDAY ) is entirely inside the new one > REMOVE" ;
111
+ elif [[ " $GTFS_DIR_START_DATE " -lt " $YESTERDAY " && " $START_DATE " -le " $YESTERDAY " && " $ GTFS_DIR_END_DATE" -le " $END_DATE " ]]; then
112
+ echo " - GTFS (after $YESTERDAY ) is entirely inside the new (in-progress) one > REMOVE" ;
113
113
rm -r " $GTFS_DIR " ;
114
114
checkResult $? ;
115
115
elif [[ " $GTFS_DIR_START_DATE " -gt " $END_DATE " && " $GTFS_DIR_END_DATE " -gt " $YESTERDAY " ]]; then
116
116
echo " - GTFS is entirely in the future & newer than new ZIP > KEEP" ;
117
+ elif [[ " $GTFS_DIR_END_DATE " -ge " $YESTERDAY " && " $GTFS_DIR_END_DATE " -lt " $START_DATE " ]]; then
118
+ echo " - GTFS is in-progress & older than new ZIP > KEEP" ;
117
119
else
118
120
echo " - TODO handle this case?" ;
119
121
# - new ZIP file (future) is entirely inside archive ZIP file (current)
@@ -127,4 +129,4 @@ NEW_ARCHIVE_DIR="${ARCHIVE_DIR}/${START_DATE}-${END_DATE}";
127
129
cp -R " $FILES_DIR /." " $NEW_ARCHIVE_DIR " ;
128
130
checkResult $? ;
129
131
130
- echo " >> Archiving GTFS... DONE ($ARCHIVE_FILE )"
132
+ echo " >> Archiving GTFS... DONE ($NEW_ARCHIVE_DIR )"
You can’t perform that action at this time.
0 commit comments