0.7.12.5 (Work)
Icon batch work
This commit is contained in:
@@ -11,6 +11,7 @@ class ProgressBar {
|
||||
protected static $time_update;
|
||||
protected static $total;
|
||||
protected static $done;
|
||||
protected static $noline;
|
||||
protected static $message;
|
||||
|
||||
public static function display($message = null) {
|
||||
@@ -34,14 +35,18 @@ class ProgressBar {
|
||||
if ($message) {
|
||||
return "\n".$string."\n".$message;
|
||||
} elseif (!strpos(__FILE__,".app")) {
|
||||
// if script is run outside app bundle, attempt to print progress inline
|
||||
return "\r\033[K\r".$string;
|
||||
} elseif (self::$noline) {
|
||||
return $string;
|
||||
} else {
|
||||
return "\n".$string;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static function start($total, $message = null) {
|
||||
public static function start($total, $message = null, $noline = false) {
|
||||
self::$noline = $noline;
|
||||
self::$done = 0;
|
||||
self::$total = $total;
|
||||
self::$time_start = time();
|
||||
|
||||
Reference in New Issue
Block a user