Skip to content

Instantly share code, notes, and snippets.

View mmarquezv's full-sized avatar
🎯
Focusing

Miguel Adolfo Márquez Vacas mmarquezv

🎯
Focusing
View GitHub Profile
@mmarquezv
mmarquezv / version_compare.sh
Last active January 18, 2021 17:38
git versions comparer maven
#!/bin/bash
vercomp () {
if [[ $1 == $2 ]]
then
return 0
fi
local IFS=.
local i ver1=($1) ver2=($2)
# fill empty fields in ver1 with zeros
for ((i=${#ver1[@]}; i<${#ver2[@]}; i++))