Skip to content

Commit

Permalink
Fix shell substitution error (#spechub#2126)
Browse files Browse the repository at this point in the history
  • Loading branch information
rosento committed Oct 25, 2022
1 parent b3caf9b commit e10141a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion var.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ OSVERS := $(shell uname -v 2>/dev/null)
# what makes comparing version numbers much easier. If any part in the version
# string is not a number, it gets replaced by '0'.
# This macro requires features found in shells like ksh93 or bash.
version = $(shell X="$(1)"; X="$${X\#\#*-}"; A=( $${X//./ } 0 0 0 ); \
version = $(shell X="$(1)"; X="$${X##*-}"; A=( $${X//./ } 0 0 0 ); \
A=( $$( printf "%d %d %d" "$${A[0]}" "$${A[1]}" "$${A[2]}" )); \
echo $$(( $${A[0]} * 1000000 + $${A[1]} * 1000 + $${A[2]} )) \
)
Expand Down

0 comments on commit e10141a

Please sign in to comment.