From 84f3aa62c7c0a3d89ae75a8ce4d50a59e5130660 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Fri, 25 Nov 2016 09:51:28 +0100 Subject: [PATCH] Check if zshrc has been modified --- zshrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/zshrc b/zshrc index 188f32b..282ab82 100644 --- a/zshrc +++ b/zshrc @@ -3,6 +3,15 @@ # Path to the dotfiles DOTFILES=$HOME/.config/dotfiles +# Check if zshrc has been modified +# I like jokes, but I prefer when I'm the one who makes them +git -C $DOTFILES diff --exit-code zshrc zsh > /dev/null 2>&1 + +if [ $? -ne 0 ]; then + echo >&2 "Your zshrc has been modified... nothing will be executed, please check it" + return +fi + # Path to your oh-my-zsh configuration ZSH=$HOME/.oh-my-zsh ZSH_CUSTOM=$HOME/.config/dotfiles/zsh/oh-my-zsh