Advertisement
zefie

sdr repo updater

Apr 24th, 2013
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.88 KB | None | 0 0
  1. <?php
  2. // 1 = git
  3. // 2 = svn
  4. // 3 = cvs (yet to be used)
  5.  
  6. $repos[] = array("gnuradio",1);
  7. $repos[] = array("gqrx",1);
  8. $repos[] = array("gr-iqbal",1);
  9. $repos[] = array("gr-osmosdr",1);
  10. $repos[] = array("gr-pocsag",2);
  11. $repos[] = array("kalibrate-rtl",1);
  12. $repos[] = array("libosmo-dsp",1);
  13. $repos[] = array("multimode",2);
  14. $repos[] = array("rtl-sdr",1);
  15. $repos[] = array("sdrsharp",2);
  16. $repos[] = array("uhd",1);
  17.  
  18.  
  19.  
  20. foreach ($repos as $repo) {
  21.         $d = $repo[0];
  22.         $t = $repo[1];
  23.         echo "Updating ".$d." via ";
  24.         switch ($t)  {
  25.                 case 1:
  26.                         echo "git\n";
  27.                         system("cd '".$d."' && git pull");
  28.                         break;
  29.                 case 2:
  30.                         echo "svn\n";
  31.                         system("cd '".$d."' && svn update");
  32.                         break;
  33.         }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement