Update tools.func
This commit is contained in:
parent
5a7ed724df
commit
79d3bdbcef
@ -931,7 +931,11 @@ function fetch_and_deploy_gh_release() {
|
||||
fi
|
||||
$STD unzip "$tmpdir/$filename" -d "$target"
|
||||
elif [[ "$filename" == *.tar.* ]]; then
|
||||
if tar -tf "$tmpdir/$filename" | grep -qE '^([^/]+/){2}'; then
|
||||
tar --strip-components=1 -xf "$tmpdir/$filename" -C "$target"
|
||||
else
|
||||
tar -xf "$tmpdir/$filename" -C "$target"
|
||||
fi
|
||||
else
|
||||
msg_error "Unsupported archive format: $filename"
|
||||
rm -rf "$tmpdir"
|
||||
|
Loading…
x
Reference in New Issue
Block a user