harshadyeola
9 years ago
2 changed files with 39 additions and 0 deletions
@ -0,0 +1,26 @@ |
|||
<?php |
|||
|
|||
|
|||
|
|||
class APT extends PKG_MANAGER |
|||
{ |
|||
|
|||
function install() { |
|||
$this->cmd = 'apt-get install '.$this->pkg ; |
|||
$this->execute_local(); |
|||
|
|||
} |
|||
|
|||
|
|||
function execute_local() { |
|||
$output = array(); |
|||
$res = exec( $this->cmd, $output, $return ); |
|||
$this->res = $output; |
|||
print_r( $this->res ); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
|
@ -0,0 +1,13 @@ |
|||
<?php |
|||
|
|||
/** |
|||
* Base class for package managements |
|||
* |
|||
*/ |
|||
|
|||
abstract class PKG_MANAGER { |
|||
|
|||
public function __construct() {} |
|||
|
|||
|
|||
} |
Loading…
Reference in new issue