From 157937c9e6c51c5b5a332843e8d85d0765527975 Mon Sep 17 00:00:00 2001 From: TheElectronWill Date: Wed, 22 Apr 2020 16:03:40 +0200 Subject: [PATCH] Use wget with progress bar --- create-package.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/create-package.sh b/create-package.sh index ceb941f..477a19d 100755 --- a/create-package.sh +++ b/create-package.sh @@ -57,14 +57,7 @@ fi # Downloads the discord tar.gz archive and puts its name in the global variable archive_name. download_discord() { echo "Downloading $app_name for linux..." - if [[ "$downloader" == 'wget' ]]; then - wget --content-disposition $progress "${download_url}?platform=linux&format=tar.gz" - else - # curl's content disposition tends to fail, get the direct URL manually instead and remove the carriage return - direct_url=$(curl -sSI "${download_url}?platform=linux&format=tar.gz" | grep location | awk '{print $2}') - direct_url=${direct_url%$'\r'} - curl -SO $progress $direct_url - fi + wget --content-disposition $wget_progress "${download_url}?platform=linux&format=tar.gz" archive_name="$(ls *.tar.gz)" }