mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-20 02:11:36 +00:00
28 lines
657 B
PHP
28 lines
657 B
PHP
<?php
|
|
|
|
namespace App\SSHCommands\Storage;
|
|
|
|
use App\SSHCommands\Command;
|
|
use Illuminate\Support\Facades\File;
|
|
|
|
class UploadToDropboxCommand extends Command
|
|
{
|
|
public function __construct(protected string $src, protected string $dest, protected string $token)
|
|
{
|
|
}
|
|
|
|
public function file(): string
|
|
{
|
|
return File::get(resource_path('commands/storage/upload-to-dropbox.sh'));
|
|
}
|
|
|
|
public function content(): string
|
|
{
|
|
return str($this->file())
|
|
->replace('__src__', $this->src)
|
|
->replace('__dest__', $this->dest)
|
|
->replace('__token__', $this->token)
|
|
->toString();
|
|
}
|
|
}
|