Skip to content

Commit

Permalink
better version number extraction
Browse files Browse the repository at this point in the history
with the release of 1.0 and the new file name format splitting on just . was dropping the 1 so version comparisons were incorrect.
Changed to treat all non numeric sequences as field separators.
  • Loading branch information
mstinaff authored Jun 25, 2016
1 parent ab47d68 commit 298fbe9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PMS_Updater.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ LogMsg()
## so v0.9.9.10.485 becomes 00000009000900100485
verNum()
{
echo "$@" | awk -F. '{ printf("%04d%04d%04d%04d%04d", $1,$2,$3,$4,$5)}'
echo "$@" | awk -F '[^0-9]+' '{ printf("%04d%04d%04d%04d%04d", $1,$2,$3,$4,$5)}'
}


Expand Down

0 comments on commit 298fbe9

Please sign in to comment.