maestrogerardo / i3-gaps-deb

Tool to create and install Debian (or Ubuntu) packages of i3-gaps.
GNU General Public License v3.0
313 stars 45 forks source link

fix: [regex] Fixed multi-match version number in current version. #12

Closed SteveClement closed 5 years ago

SteveClement commented 5 years ago

Contents of I3_VERSION:

4.16.1-non-git

Old buggy:

$ grep -o "\w*[0-9\.]\w*" I3_VERSION || echo "0.0.0"
4.16
.1
$ grep -P -o "\d+(?:\.\d+)+" I3_VERSION || echo "0.0.0"
4.16.1
maestrogerardo commented 5 years ago

Hi Steve, thanks for providing this patch! :-)