From 9f208be76e202a70e80f08362f6b8808ce7ea649 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 10 Dec 2015 00:23:02 +0300 Subject: Add into status.sh script check for directories without .git. --- status.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/status.sh b/status.sh index 9ce9aca..1b779ff 100755 --- a/status.sh +++ b/status.sh @@ -46,6 +46,10 @@ function status { if [ ! -d "$1" ]; then return fi + if [ ! -d "$1/.git" ]; then + echo -e "\e[1;31mError: directory '$1' without git detected. Please remote it and install if need tasks.\e[0m" + return + fi DIR=$(pwd) cd "$1" STR=$(git diff --stat --color=always) -- cgit v1.2.3-60-g2f50