Advertisement
Guest User

Untitled

a guest
Jul 13th, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
D 0.49 KB | None | 0 0
  1.         // more code here to get dirs (string[])
  2.  
  3.     foreach(entry; parallel(dirs))
  4.     {
  5.         if (entry.exists)
  6.         {
  7.             if (entry.isDir)
  8.                 gitPull(entry);
  9.         }
  10.         else
  11.             writefln("Warning: %s does not exist.\n", entry);
  12.     }
  13.    
  14.     writeln("Done.");
  15. }
  16.  
  17. /// Pulls from git in the given directory and displays the output in stdout.
  18. void gitPull(string dirName)
  19. {
  20.     auto pid = executeShell("git pull", null, Config.none, size_t.max, dirName);
  21.     writeln("== ", dirName, " ==\n", pid.output);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement