Skip to content

Commit

Permalink
fix version check
Browse files Browse the repository at this point in the history
  • Loading branch information
nacho committed Aug 10, 2017
1 parent 0e259cb commit c829833
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/ncp-test-updates
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ if test -f $VERFILE && grep -qP "v\d+\.\d+\.\d+" $VERFILE; then
MIN=$( grep -oP "\d+\.\d+\.\d+" /usr/local/etc/ncp-version | cut -d. -f2 )
PAT=$( grep -oP "\d+\.\d+\.\d+" /usr/local/etc/ncp-version | cut -d. -f3 )

if [[ $MAJOR > $MAJ ]]; then
if [ $MAJOR -gt $MAJ ]; then
NEED_UPDATE=true
elif [[ $MAJOR == $MAJ ]] && [[ $MINOR > $MIN ]]; then
elif [ $MAJOR -eq $MAJ ] && [ $MINOR -gt $MIN ]; then
NEED_UPDATE=true
elif [[ $MAJOR == $MAJ ]] && [[ $MINOR == $MIN ]] && [[ $PATCH > $PAT ]]; then
elif [ $MAJOR -eq $MAJ ] && [ $MINOR -eq $MIN ] && [ $PATCH -gt $PAT ]; then
NEED_UPDATE=true
fi
fi
Expand Down

0 comments on commit c829833

Please sign in to comment.