tools/make-version-header.sh: fix minor version extraction
bash considers sequences of integers starting with zero to be octal, so e.g. a $minor value of "08" will be taken as an (illegal) octal number, causing an error. To fix this, we drop any leading zero when extracting the minor version.master
parent
6dddb9d854
commit
5f38a63b2a
|
@ -39,7 +39,7 @@ case $# in
|
|||
esac
|
||||
|
||||
major="`echo "$version" | sed -n -e '1s/^\([0-9]*\)\..*/\1/p'`"
|
||||
minor="`echo "$version" | sed -n -e '1s/^[0-9]*\.\([0-9]*\).*/\1/p'`"
|
||||
minor="`echo "$version" | sed -n -e '1s/^[0-9]*\.0*\([0-9]*\).*/\1/p'`"
|
||||
patchlvl="`echo "$version" | sed -n -e '1s/^[0-9]*\.[0-9]*\.\([0-9]*\).*/\1/p'`"
|
||||
suffix="`echo "$version" | sed -n -e '1s/^[^+]*+\(.*\)/\1/p'`"
|
||||
|
||||
|
|
Loading…
Reference in New Issue