Update utils.sh

This commit is contained in:
Fioren
2024-03-19 07:51:11 +07:00
committed by GitHub
parent 46e34ca10f
commit e5215def60

View File

@@ -46,7 +46,7 @@ dl_gh() {
if [[ $line == *"\"browser_download_url\":"* ]]; then
if [ $assets -eq 1 ]; then
url=$(echo $line | cut -d '"' -f 4)
if [[ $url != *.asc ]] && [[ $url != *.json ]]; then
if [[ $url != *.asc ]]; then
name=$(basename "$url")
wget -q -O "$name" "$url"
green_log "[+] Downloading $name from $owner"
@@ -66,10 +66,8 @@ dl_gh() {
wget -qO- "https://api.github.com/repos/$2/$repo/releases/tags/$3" \
| jq -r '.assets[] | "\(.browser_download_url) \(.name)"' \
| while read -r url names; do
if [[ $names != *.json ]]; then
green_log "[+] Downloading $names from $2"
wget -q -O "$names" $url
fi
done
done
fi