From 11dc8c730dda2c5bd38cb386f96331c5ce3cac9c Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Tue, 20 Apr 2021 12:44:20 +0200 Subject: Adds a bunch of new Modules --- src/GitModule.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/GitModule.php (limited to 'src/GitModule.php') diff --git a/src/GitModule.php b/src/GitModule.php new file mode 100644 index 0000000..3927992 --- /dev/null +++ b/src/GitModule.php @@ -0,0 +1,45 @@ +dest"); + $ls = Connection::read(); + + $state = ! str_contains($ls, 'No such file or directory'); + + Connection::disablePty(); + + return $state; + } + + /** + * @inheritDoc + */ + public function getCommands(): array + { + Connection::exec( + "sudo git clone $this->repo $this->dest" . PHP_EOL . + $this->getPermissions($this->dest) + ); + + return []; + } +} -- cgit v1.2.3