Skip missing directories for real.
authorMatthias Kilian <kili@outback.escape.de>
Sun, 24 Apr 2011 15:22:50 +0000 (17:22 +0200)
committerIan Lynagh <igloo@earth.li>
Wed, 27 Apr 2011 15:22:37 +0000 (16:22 +0100)
While here, make the code a little bit more readable.

sync-all

index 7ccc71d..3ccbc86 100755 (executable)
--- a/sync-all
+++ b/sync-all
@@ -310,20 +310,14 @@ sub scmall {
             if (-d "$localpath/.git") {
                 die "Found both _darcs and .git in $localpath";
             }
-            else {
-                $scm = "darcs";
-            }
-        }
-        else {
-            if (-d "$localpath/.git") {
-                $scm = "git";
-            }
-            elsif ($tag eq "") {
-                die "Required repo $localpath is missing";
-            }
-            else {
-                message "== $localpath repo not present; skipping";
-            }
+            $scm = "darcs";
+        } elsif (-d "$localpath/.git") {
+            $scm = "git";
+        } elsif ($tag eq "") {
+            die "Required repo $localpath is missing";
+        } else {
+             message "== $localpath repo not present; skipping";
+             next;
         }
 
         # Work out the arguments we should give to the SCM