Skip to content

Commit

Permalink
curl-config: revert to backticks to support old target envs
Browse files Browse the repository at this point in the history
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: curl#13307 (comment)
Follow-up to fa69b41 curl#13307
Closes curl#13871
  • Loading branch information
vszakats committed Jun 4, 2024
1 parent 5f9017d commit dada673
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions curl-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#
###########################################################################

# shellcheck disable=SC2006

prefix="@prefix@"
# Used in @libdir@
# shellcheck disable=SC2034
Expand Down Expand Up @@ -100,17 +102,17 @@ while test "$#" -gt 0; do

--checkfor)
checkfor=$2
cmajor=$(echo "$checkfor" | cut -d. -f1)
cminor=$(echo "$checkfor" | cut -d. -f2)
cmajor=`echo "$checkfor" | cut -d. -f1`
cminor=`echo "$checkfor" | cut -d. -f2`
# when extracting the patch part we strip off everything after a
# 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)
vminor=$(echo '@CURLVERSION@' | cut -d. -f2)
vmajor=`echo '@CURLVERSION@' | cut -d. -f1`
vminor=`echo '@CURLVERSION@' | cut -d. -f2`
# when extracting the patch part we strip off everything after a
# 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
exit 0
Expand Down

0 comments on commit dada673

Please sign in to comment.