diff --git a/github/check.sickchill.update b/github/check.sickchill.update index 4b11b97..f46b703 100755 --- a/github/check.sickchill.update +++ b/github/check.sickchill.update @@ -100,9 +100,9 @@ define_vars() { # {{{ ## TODO: Use --no-progress-meter instead of --silent ## when curl 7.74.x will be available on Debian Stable - sickchill_current_version=$(curl --silent "${sickchill_url:=/dev/null}" | \grep -oP '(?<=https://github.com/SickChill/SickChill/releases/tag/v)[[:alnum:].]*') + sickchill_current_version=$(curl --silent "${sickchill_url:=/dev/null}" | \grep --only-matching --perl-regexp '(?<=https://github.com/SickChill/SickChill/releases/tag/v)[[:alnum:].]*') - sickchill_new_version=$("${script_wd}"/releasetags "${sickchill_repo_url}" | grep -vE -- '(dev|rc)' | head -n1 | sed 's/v//') + sickchill_new_version=$("${script_wd}"/releasetags "${sickchill_repo_url}" | grep --invert-match --extended-regexp -- '(dev|rc)' | head --lines=1 | sed --silent 's/v\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p') } # }}} @@ -126,7 +126,7 @@ Create ${sickchill_new_version_file} temp file to monitore." else debug_message "Test Sickchill version − \ The current version (${sickchill_current_version}) is up-to-date." - rm -f -- "${sickchill_new_version_file}" + rm --force -- "${sickchill_new_version_file}" fi ## }}} @@ -139,7 +139,7 @@ The current version (${sickchill_current_version}) is up-to-date." if [ ! "${NBARGS}" -eq "0" ]; then ## If the first argument is not an option - if ! printf -- '%s' "${1}" | grep -q -E -- "^-+"; + if ! printf -- '%s' "${1}" | grep --quiet --extended-regexp -- "^-+"; then usage error_message "Unknown argument (${1}), check the help." 1 @@ -148,7 +148,7 @@ if [ ! "${NBARGS}" -eq "0" ]; then manage_arg="0" # Parse all options (start with a "-") one by one - while printf -- '%s' "${1}" | grep -q -E -- "^-+"; do + while printf -- '%s' "${1}" | grep --quiet --extended-regexp -- "^-+"; do case "${1}" in -u|--url ) ## Set URL