Update tools.func
This commit is contained in:
parent
7221b39759
commit
2c84379711
@ -889,7 +889,18 @@ function fetch_and_deploy_gh_release() {
|
||||
}
|
||||
|
||||
mkdir -p "$target"
|
||||
[[ $filename == *.zip ]] && unzip "$tmpdir/$filename" -d "$target" || [[ $filename == *.tar.gz ]] && tar -xzf "$tmpdir/$filename" -C "$target"
|
||||
if [[ "$filename" == *.zip ]]; then
|
||||
if ! command -v unzip &>/dev/null; then
|
||||
$STD apt-get install -y unzip
|
||||
fi
|
||||
unzip "$tmpdir/$filename" -d "$target"
|
||||
elif [[ "$filename" == *.tar.gz ]]; then
|
||||
tar -xzf "$tmpdir/$filename" -C "$target"
|
||||
else
|
||||
msg_error "Unsupported archive format: $filename"
|
||||
rm -rf "$tmpdir"
|
||||
return 1
|
||||
fi
|
||||
|
||||
elif [[ "$mode" == "singlefile" ]]; then
|
||||
local pattern="$6"
|
||||
|
Loading…
x
Reference in New Issue
Block a user