Created
January 31, 2009 14:40
-
-
Save sotarok/55563 to your computer and use it in GitHub Desktop.
github-pull-queue-observe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* github-pull-queue-observe.php | |
* | |
* @description file queue | |
*/ | |
define("__DIR__", realpath(dirname(__FILE__))); | |
echo __DIR__; | |
while(1) { | |
foreach (glob("./queue/*") as $file) { | |
$file_path = realpath($file); | |
$file_name = basename($file); | |
chdir(__DIR__ . "/$file_name"); | |
system("/usr/bin/git pull"); | |
chdir(__DIR__); | |
unlink($file_path); | |
} | |
sleep(1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment