Created
July 21, 2015 13:09
-
-
Save allex/61f69d0a928d750a254a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# 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