Skip to content

Instantly share code, notes, and snippets.

@allex
Created July 21, 2015 13:09
Show Gist options
  • Save allex/61f69d0a928d750a254a to your computer and use it in GitHub Desktop.
Save allex/61f69d0a928d750a254a to your computer and use it in GitHub Desktop.
<?php
# GistID: 61f69d0a928d750a254a
$dir = __DIR__;
$update_sh = "$dir/release.sh";
$handle = popen($update_sh, 'r');
if (ob_get_level() == 0)
ob_start();
if (is_resource($handle)) {
while (!feof($handle)) {
$buffer = fgets($handle, 2);
echo "$buffer";
ob_flush();
flush();
}
pclose($handle);
} else {
echo "not run.";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment