aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/detect-leak19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/detect-leak b/scripts/detect-leak
new file mode 100755
index 00000000..f27b11cc
--- /dev/null
+++ b/scripts/detect-leak
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+for f in "$@"; do
+
+ if ! printf "%s" "$f" | grep -q test; then
+ continue
+ fi
+
+ if ! grep -q '\\Datum' "$f"; then
+ continue
+ fi
+
+ datum="$(sed -n -r -e 's/\\Datum\{([[:digit:]]{2})\.([[:digit:]]{2})\.([[:digit:]]{4})\}/\3-\2-\1/p' "$f")"
+ today="$(date +%s)"
+ if [ "$(date -d"${datum}" +%s)" -gt "${today}" ]; then
+ echo Test "${f}" am "${datum}" liegt in der Zukunft >&2
+ exit 1
+ fi
+done