We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3569e03 commit 8ccdb12Copy full SHA for 8ccdb12
_scripts/_malformeddates.sh
@@ -1,5 +1,16 @@
1
#!/bin/sh
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
13
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)
15
if [ -n "${malformed_event_dates}" ]; then
16
echo "Malformed event date in:" >&2
0 commit comments