Skip to content

Commit

Permalink
fixed display download size
Browse files Browse the repository at this point in the history
  • Loading branch information
heuwerk committed Jul 7, 2022
1 parent 69ba5b0 commit ed5499c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions updateproton.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ get_new_version() {
printf "ERROR: Could not fetch latest version!\n" && exit 1

download_size="$(! wget "${WEBSITE}" -qO- | grep -o '[0-9]\+ MB')" &&
printf "WARNING: Could not fetch download size.\n"
printf "INFO: Could not fetch download size.\n"

# extracts the newest Proton release
proton_version="${proton_version##*/}"

# output of newest version
printf "Latest version: %s (%s)\n" "${proton_version}" "${download_size}"
printf "Latest version: %s\n" "${proton_version}"
}

# checks, if the newest version is already installed.
Expand All @@ -42,9 +42,10 @@ check_installed_version() {
printf "Installed version: %s\n" "${proton_installed}" || \
printf "Proton not installed\n"

printf "Changelog: https://github.com/GloriousEggroll/proton-ge-custom/releases/tag/%s \n" "${proton_version}"
printf "\nChangelog: https://github.com/GloriousEggroll/proton-ge-custom/releases/tag/%s \n" "${proton_version}"
printf "Download size: %s\n" "${download_size}"

printf "\nInstall new version? [Y/n]: " ; read -r answer
printf "\nInstall new version? [Y/n]: " "${download_size}"; read -r answer
case "${answer}" in
[YyJj]|[Yy]es|[Jj]a|"") update="1" ;;
*) exit 0 ;;
Expand Down

0 comments on commit ed5499c

Please sign in to comment.