New backup format with commands in CLI.
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
<?php
|
||||
|
||||
/* Get the size of the terminal (only works on Linux, on Windows it's always 80) */
|
||||
preg_match_all("/rows.([0-9]+);.columns.([0-9]+);/", strtolower(exec('stty -a |grep columns')), $output);
|
||||
if(sizeof($output) == 3) {
|
||||
define("COLUMNS", $output[2][0]);
|
||||
} else {
|
||||
define("COLUMNS", 80);
|
||||
}
|
||||
|
||||
/**
|
||||
* From http://www.php.net/manual/en/function.getopt.php#83414
|
||||
* Parses $args for parameters and assigns them to an array.
|
||||
|
||||
Reference in New Issue
Block a user