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