- this script notifies users about existing when he
logs in to the machine
- it remembers the last time when it was executed and shows
only the number of new crashes since the last run
---
src/cli/Makefile.am | 4 ++++
src/cli/abrt-console-notification.sh | 12 ++++++++++++
2 files changed, 16 insertions(+)
create mode 100755 src/cli/abrt-console-notification.sh
diff --git a/src/cli/Makefile.am b/src/cli/Makefile.am
index 2f70ec7..981919e 100644
--- a/src/cli/Makefile.am
+++ b/src/cli/Makefile.am
@@ -20,5 +20,9 @@ abrt_cli_CFLAGS = \
abrt_cli_LDADD = \
$(LIBREPORT_LIBS) \
../lib/libabrt.la
+
+profileconfigdir = $(sysconfdir)/profile.d
+dist_profileconfig_DATA = \
+ abrt-console-notification.sh
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
diff --git a/src/cli/abrt-console-notification.sh b/src/cli/abrt-console-notification.sh
new file mode 100755
index 0000000..f56227d
--- /dev/null
+++ b/src/cli/abrt-console-notification.sh
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+LPATH="$HOME/.cache/abrt/lastnotificaion"
+
+SINCE=0
+if [ -f $LPATH ]; then
+ SINCE=(`cat $LPATH`)
+else
+ date +%s > "$LPATH"
+fi
+
+abrt-cli status --since="$SINCE"
--
1.8.1.4