@@ -2,21 +2,21 @@ |
||
| 2 | 2 | /* |
| 3 | 3 | Laravel 7 downloader and unpacker without external packages |
| 4 | 4 | */ |
| 5 | - $latestReleaseURL = 'https://api.github.com/repos/OpenVPN/easy-rsa/releases/latest'; |
|
| 6 | - $latestReleaseData = Http::get($latestReleaseURL)->json(); |
|
| 5 | + $latestReleaseURL = 'https://api.github.com/repos/OpenVPN/easy-rsa/releases/latest'; |
|
| 6 | + $latestReleaseData = Http::get($latestReleaseURL)->json(); |
|
| 7 | 7 | |
| 8 | - $gzArchivePath = storage_path ('app/bin/easy-rsa.tar.gz'); |
|
| 9 | - $tarArchivePath = substr ($gzArchivePath, 0, -3); |
|
| 10 | - $binPath = storage_path ('app/bin/'); |
|
| 8 | + $gzArchivePath = storage_path ('app/bin/easy-rsa.tar.gz'); |
|
| 9 | + $tarArchivePath = substr ($gzArchivePath, 0, -3); |
|
| 10 | + $binPath = storage_path ('app/bin/'); |
|
| 11 | 11 | |
| 12 | - // Gunzip |
|
| 13 | - $phar = new \PharData ($gzArchivePath); |
|
| 14 | - $phar->decompress (); |
|
| 12 | + // Gunzip |
|
| 13 | + $phar = new \PharData ($gzArchivePath); |
|
| 14 | + $phar->decompress (); |
|
| 15 | 15 | |
| 16 | - // Unpack |
|
| 17 | - $phar = new \PharData ($tarArchivePath); |
|
| 18 | - $phar->extractTo ($binPath); |
|
| 16 | + // Unpack |
|
| 17 | + $phar = new \PharData ($tarArchivePath); |
|
| 18 | + $phar->extractTo ($binPath); |
|
| 19 | 19 | |
| 20 | - // Rename |
|
| 21 | - rename ($binPath . $phar->getFilename(), $binPath . 'easy-rsa'); |
|
| 20 | + // Rename |
|
| 21 | + rename ($binPath . $phar->getFilename(), $binPath . 'easy-rsa'); |
|
| 22 | 22 | ?> |