curl-config: revert to backticks to support old target envs

Make an exception for `curl-config` because this script that may be
running on any target system, including old ones, e.g. SunOS 5.10.

Reported-by: Alejandro R. Sedeño
Ref: https://github.com/curl/curl/pull/13307#issuecomment-2146427358
Follow-up to fa69b41c77 #13307
Closes #13871
This commit is contained in:
Viktor Szakats 2024-06-04 04:19:32 +02:00
parent 5f9017d4e2
commit dada6736df
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -23,6 +23,8 @@
# #
########################################################################### ###########################################################################
# shellcheck disable=SC2006
prefix="@prefix@" prefix="@prefix@"
# Used in @libdir@ # Used in @libdir@
# shellcheck disable=SC2034 # shellcheck disable=SC2034
@ -100,17 +102,17 @@ while test "$#" -gt 0; do
--checkfor) --checkfor)
checkfor=$2 checkfor=$2
cmajor=$(echo "$checkfor" | cut -d. -f1) cmajor=`echo "$checkfor" | cut -d. -f1`
cminor=$(echo "$checkfor" | cut -d. -f2) cminor=`echo "$checkfor" | cut -d. -f2`
# when extracting the patch part we strip off everything after a # when extracting the patch part we strip off everything after a
# dash as that's used for things like version 1.2.3-pre1 # dash as that's used for things like version 1.2.3-pre1
cpatch=$(echo "$checkfor" | cut -d. -f3 | cut -d- -f1) cpatch=`echo "$checkfor" | cut -d. -f3 | cut -d- -f1`
vmajor=$(echo '@CURLVERSION@' | cut -d. -f1) vmajor=`echo '@CURLVERSION@' | cut -d. -f1`
vminor=$(echo '@CURLVERSION@' | cut -d. -f2) vminor=`echo '@CURLVERSION@' | cut -d. -f2`
# when extracting the patch part we strip off everything after a # when extracting the patch part we strip off everything after a
# dash as that's used for things like version 1.2.3-pre1 # dash as that's used for things like version 1.2.3-pre1
vpatch=$(echo '@CURLVERSION@' | cut -d. -f3 | cut -d- -f1) vpatch=`echo '@CURLVERSION@' | cut -d. -f3 | cut -d- -f1`
if test "$vmajor" -gt "$cmajor"; then if test "$vmajor" -gt "$cmajor"; then
exit 0 exit 0