File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
-
2
+ online_and_timezone=$( grep -Er --files-match ' ^online: true$' | xargs grep --files-with-match ' ^tz:' )
3
+ if [ -n " ${malformed_event_dates} " ]; then
4
+ echo " Online events should not have a time-zone. Offending files:" >&2
5
+ echo " ${malformed_event_dates} " >&2
6
+ exit 1
7
+ fi
8
+ malformed_timezones=$( grep -Er --files-match ' ^tz:[^/]*$' )
9
+ if [ -n " ${malformed_timezones} " ]; then
10
+ echo " Time-zones should be in the form 'Continent/City'. Offending files:" >&2
11
+ echo " ${malformed_timezones} " >&2
12
+ exit 1
13
+ fi
3
14
malformed_event_dates=$( grep -Er --files-without-match ' ^eventdate: [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} [-+][0-9]{4}$' _events)
4
15
if [ -n " ${malformed_event_dates} " ]; then
5
16
echo " Malformed event date in:" >&2
You can’t perform that action at this time.
0 commit comments