Transfer
This commit is contained in:
parent
bc8756a402
commit
810a369059
|
@ -0,0 +1,29 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Created by PhpStorm.
|
||||||
|
* User: eric
|
||||||
|
* Date: 12/22/16
|
||||||
|
* Time: 5:52 PM
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sikofitt\OS;
|
||||||
|
|
||||||
|
|
||||||
|
class OSReleaseProber {
|
||||||
|
|
||||||
|
public function getReleaseFile()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function ParseReleaseFile()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFlavor()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -24,6 +24,12 @@ use Symfony\Component\Process\ProcessBuilder;
|
||||||
*/
|
*/
|
||||||
class TorDownloadCommand extends Command {
|
class TorDownloadCommand extends Command {
|
||||||
|
|
||||||
|
const TOR_DEPENDS = 'libevent-dev build-essential libssl-dev libseccomp-dev libscrypt-dev';
|
||||||
|
const TOR_CONFIGURE_LINE = './configure --prefix=`pwd`/../tor-client';
|
||||||
|
const TOR_APT_COMMAND = 'apt-get install tor -y'; //etc/os-release
|
||||||
|
const TOR_EMERGE_COMMAND = 'emerge -v net-misc/tor'; //etc/os-release
|
||||||
|
const TOR_YUM_COMMAND = 'yum install tor'; //etc/redhat-release
|
||||||
|
|
||||||
private $downloadUrls = [
|
private $downloadUrls = [
|
||||||
'linux' => [
|
'linux' => [
|
||||||
'file' => 'https://www.torproject.org/dist/tor-0.2.9.8.tar.gz',
|
'file' => 'https://www.torproject.org/dist/tor-0.2.9.8.tar.gz',
|
||||||
|
@ -57,7 +63,7 @@ class TorDownloadCommand extends Command {
|
||||||
$file = $guzzle->get($this->downloadUrls['linux']['file']);
|
$file = $guzzle->get($this->downloadUrls['linux']['file']);
|
||||||
file_put_contents($this->baseDir . '/' . $this->downloadUrls['linux']['filename'], $file->getBody()->getContents());
|
file_put_contents($this->baseDir . '/' . $this->downloadUrls['linux']['filename'], $file->getBody()->getContents());
|
||||||
}
|
}
|
||||||
|
|
||||||
$tar = new ProcessBuilder();
|
$tar = new ProcessBuilder();
|
||||||
$tar->setPrefix('/bin/tar')
|
$tar->setPrefix('/bin/tar')
|
||||||
->setWorkingDirectory($this->baseDir)
|
->setWorkingDirectory($this->baseDir)
|
||||||
|
|
Loading…
Reference in New Issue