mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 22:46:16 +00:00
Built-in File Manager (#458)
This commit is contained in:
@ -1 +1 @@
|
||||
rm -f {{ $path }}
|
||||
rm -rf {{ $path }}
|
||||
|
15
resources/views/ssh/os/extract.blade.php
Normal file
15
resources/views/ssh/os/extract.blade.php
Normal file
@ -0,0 +1,15 @@
|
||||
@php
|
||||
$extension = pathinfo($path, PATHINFO_EXTENSION);
|
||||
@endphp
|
||||
|
||||
@if($extension === 'zip')
|
||||
unzip -o {{ $path }} -d {{ $destination }}
|
||||
@elseif($extension === 'tar'))
|
||||
tar -xf {{ $path }} -C {{ $destination }}
|
||||
@elseif(in_array($extension, ['gz', 'tar.gz']))
|
||||
tar -xzf {{ $path }} -C {{ $destination }}
|
||||
@elseif(in_array($extension, ['bz2', 'tar.bz2']))
|
||||
tar -xjf {{ $path }} -C {{ $destination }}
|
||||
@else
|
||||
echo "Unsupported archive format: {{ $extension }}"
|
||||
@endif
|
Reference in New Issue
Block a user