Posted By

philokezzar on 07/13/09


Tagged

php textmate subversion checkout


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

sidneydekoning


Simple SVN checkout using PHP


 / Published in: Other
 

  1. // http://www.fordnox.com/blog/2008/11/simple-svn-checkout-using-php/
  2.  
  3. $username = "username";
  4. $password = "password";
  5. $repository = "http://google-web-toolkit.googlecode.com/svn/trunk/";
  6. $destination = ‘your/full/path’;
  7.  
  8. $checkout = "svn export –force –username $username –password $password $repository $destination";
  9. $result = _exec($checkout);
  10.  
  11. function _exec($cmd)
  12. {
  13. if (substr(php_uname(), 0, 7) == "Windows") {
  14. pclose(popen("start /B ". $cmd, "r"));
  15. } else {
  16. exec($cmd . " > /dev/null &");
  17. }
  18. }

Report this snippet  

You need to login to post a comment.