diff --git a/README.md b/README.md index c7b4e0c..f3ec06e 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,8 @@ Unofficial RPM package for Discord. - Creates a ready-to-use RPM package - Discord Stable, PTB, and Canary can be installed at the same time - Adds Discord to the applications list with a nice HD icon -- Supports Fedora (27, 28) and OpenSUSE (Leap). +- Supports Fedora (31) and OpenSUSE (Leap 15.1+). + ## More information ### Warning - no accents diff --git a/basic-checks.sh b/basic-checks.sh index 4bedf29..58df5ed 100644 --- a/basic-checks.sh +++ b/basic-checks.sh @@ -23,17 +23,17 @@ fi if ! type 'rpmbuild' > /dev/null; then echo 'You need the rpm development tools to create rpm packages.' style $bold - read -n 1 -p '> Install the rpmdevtools package now? [y/N]: ' answer + read -n 1 -p '> Install the required package (rpm-build) now? [y/N]: ' answer echo + style $reset case "$answer" in y|Y) - sudo_install_prompt 'Enter your password to install rpmdevtools: ' rpmdevtools + sudo_install_prompt 'Enter your password to install rpm-build: ' rpm-build ;; *) - echo "${reset}The package won't be installed. Exiting now." + echo "The package won't be installed. Exiting now." exit esac - style $reset else disp "${green}rpmbuild detected.$reset" fi diff --git a/common-functions.sh b/common-functions.sh index c758232..dedf656 100644 --- a/common-functions.sh +++ b/common-functions.sh @@ -26,17 +26,8 @@ else distrib="unknown" fi -# Initializes $downloader: checks if wget is installed and fallbacks to curl if it isn't -hash wget 2>/dev/null && downloader='wget' || downloader='curl' - -# Initializes $progress: detects if the downloader has a progress option -if [[ "$downloader" == 'wget' ]]; then - wget --help | grep -q '\--show-progress' && \ - progress='-q --show-progress' || progress='' -else - curl --help | grep -q '\--progress-bar' && \ - progress='--progress-bar' || progress='' -fi +# Initializes $wget_progress: detects if the option --show-progress is available +wget --help | grep -q '\--show-progress' && wget_progress="-q --show-progress" || wget_progress="" # ask_yesno question ## Asks a yes/no question and stores the result in the 'answer' variable @@ -67,7 +58,7 @@ ask_remove_dir() { ## If it doesn't exist, creates it. manage_dir() { if [ -d "$1" ]; then - echo "The $2 directory already exists and may contain outdated data." + echo "The $2 directory already exist and may contain outdated data." ask_remove_dir "$1" fi mkdir -p "$1"