sickchill: fix regexp for new version
This commit is contained in:
		
							parent
							
								
									64ec83c883
								
							
						
					
					
						commit
						1251f5a7de
					
				|  | @ -100,9 +100,9 @@ define_vars() {                                                 # {{{ | ||||||
| 
 | 
 | ||||||
| 	## TODO: Use --no-progress-meter instead of --silent | 	## TODO: Use --no-progress-meter instead of --silent | ||||||
| 	##       when curl 7.74.x will be available on Debian Stable | 	##       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 | 	else | ||||||
| 		debug_message "Test Sickchill version − \ | 		debug_message "Test Sickchill version − \ | ||||||
| The current version (${sickchill_current_version}) is up-to-date." | The current version (${sickchill_current_version}) is up-to-date." | ||||||
| 		rm -f -- "${sickchill_new_version_file}" | 		rm --force -- "${sickchill_new_version_file}" | ||||||
| 	fi | 	fi | ||||||
| 	## }}} | 	## }}} | ||||||
| 
 | 
 | ||||||
|  | @ -139,7 +139,7 @@ The current version (${sickchill_current_version}) is up-to-date." | ||||||
| if [ ! "${NBARGS}" -eq "0" ]; then | if [ ! "${NBARGS}" -eq "0" ]; then | ||||||
| 
 | 
 | ||||||
| 	## If the first argument is not an option | 	## If the first argument is not an option | ||||||
| 	if ! printf -- '%s' "${1}" | grep -q -E -- "^-+"; | 	if ! printf -- '%s' "${1}" | grep --quiet --extended-regexp -- "^-+"; | ||||||
| 	then | 	then | ||||||
| 		usage | 		usage | ||||||
| 		error_message "Unknown argument (${1}), check the help." 1 | 		error_message "Unknown argument (${1}), check the help." 1 | ||||||
|  | @ -148,7 +148,7 @@ if [ ! "${NBARGS}" -eq "0" ]; then | ||||||
| 	manage_arg="0" | 	manage_arg="0" | ||||||
| 
 | 
 | ||||||
| 	# Parse all options (start with a "-") one by one | 	# 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 | 	case "${1}" in | ||||||
| 		-u|--url )             ## Set URL | 		-u|--url )             ## Set URL | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue