16 lines
398 B
PHP
16 lines
398 B
PHP
|
<?php
|
||
|
|
||
|
header("content-type: text/plain");
|
||
|
|
||
|
$fetch = trim(shell_exec("git fetch 2>&1"));
|
||
|
|
||
|
if(!preg_match('/(From|Desde) https:\/\//', $fetch)){
|
||
|
echo "There are not any updates.";
|
||
|
// echo "There is no update.";
|
||
|
exit(0);
|
||
|
};
|
||
|
|
||
|
$pull = shell_exec("git pull 2>&1");
|
||
|
|
||
|
echo $fetch . "\n\n" . $pull . "\n\nIt is already updated successfully.";
|