From 1b30b668edd48b6296fdc9fb0cf3bd006c9a3589 Mon Sep 17 00:00:00 2001 From: Stefan Gaiselmann Date: Mon, 2 Aug 2021 11:55:11 +0200 Subject: [PATCH] Added motd handling (debian specific) and check if chezmoi managed files have changes. --- dot_bashrc.d/executable_11.motd | 5 +++++ dot_bashrc.d/executable_12.chezmoi | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 dot_bashrc.d/executable_11.motd create mode 100644 dot_bashrc.d/executable_12.chezmoi diff --git a/dot_bashrc.d/executable_11.motd b/dot_bashrc.d/executable_11.motd new file mode 100644 index 0000000..faa526f --- /dev/null +++ b/dot_bashrc.d/executable_11.motd @@ -0,0 +1,5 @@ +if [ -d /etc/update-motd.d ]; then + for f in /etc/update-motd.d/* ; do + . "$f" + done +fi diff --git a/dot_bashrc.d/executable_12.chezmoi b/dot_bashrc.d/executable_12.chezmoi new file mode 100644 index 0000000..3f700c9 --- /dev/null +++ b/dot_bashrc.d/executable_12.chezmoi @@ -0,0 +1,9 @@ +if chezmoi >/dev/null +then + if [[ $(chezmoi diff | wc -l) != "0" ]]; then + echo + echo "== chezmoi files have changed ==" + echo + chezmoi diff + fi +fi