summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-10 00:23:02 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-10 00:23:02 +0300
commit9f208be76e202a70e80f08362f6b8808ce7ea649 (patch)
tree2d587224771752b715312753dd25b112f6edbff6
parent19964a628ebd7729ca35657831b09a739b77fe17 (diff)
downloadall-9f208be76e202a70e80f08362f6b8808ce7ea649.tar.gz
all-9f208be76e202a70e80f08362f6b8808ce7ea649.tar.bz2
all-9f208be76e202a70e80f08362f6b8808ce7ea649.tar.xz
all-9f208be76e202a70e80f08362f6b8808ce7ea649.zip
Add into status.sh script check for directories without .git.
-rwxr-xr-xstatus.sh4
1 files changed, 4 insertions, 0 deletions
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)