]> gitweb.fluxo.info Git - scripts.git/commitdiff
ZTD: better repository detection
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 15 Mar 2017 16:04:31 +0000 (13:04 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 15 Mar 2017 16:04:31 +0000 (13:04 -0300)
ztd

diff --git a/ztd b/ztd
index 52ac5fe1e393ed4965d4f61e5e34f54d2cf92ae1..196106474e58f2872bda52d1edb5ed69dba507b2 100755 (executable)
--- a/ztd
+++ b/ztd
@@ -9,7 +9,7 @@ PROJECT="$1"
 # Try to get there
 if [ ! -z "$PROJECT" ]; then
   cd $PROJECT
-elif [ ! -d '.git' ]; then
+elif ! git status &> /dev/null; then
   cd
   remind ~/.reminders | grep -v '^No reminders.$'
   status
@@ -19,7 +19,7 @@ elif [ ! -d '.git' ]; then
 fi
 
 # Sync
-if [ -d '.git' ]; then
+if git status &> /dev/null; then
   if which updates > /dev/null; then
     updates
   else