changeset 483:7ab9c25f9c90

Fix parameter substitution if there are no '.*' dirs. Like: [: 232: /srv/hg/.: unexpected operator
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Mon, 09 Jan 2012 12:17:57 +0200
parents 65f7bb9ddf80
children 16a515a03bb3 6d8ba5ab7932 26765b325946 6c8017f37c60
files hg/hgsyncee hg/hgsyncew
diffstat 2 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hg/hgsyncee	Mon Jan 09 12:02:45 2012 +0200
+++ b/hg/hgsyncee	Mon Jan 09 12:17:57 2012 +0200
@@ -172,6 +172,7 @@
 
 for dir in */.hg/. .*/.hg/.; do
     dir=${dir%/.hg/.}
+    [ -d "$dir" ] || continue
 
     MSG="'$dir' repo."
     PrintLog PROCESSING
--- a/hg/hgsyncew	Mon Jan 09 12:02:45 2012 +0200
+++ b/hg/hgsyncew	Mon Jan 09 12:17:57 2012 +0200
@@ -170,6 +170,7 @@
 
 for dir in */.hg/. .*/.hg/.; do
     dir=${dir%/.hg/.}
+    [ -d "$dir" ] || continue
 
     MSG="'$dir' repo."
     PrintLog PROCESSING