/
githubmirror
/
keyutils
Обзор
Документация
Войти
/
githubmirror
/
keyutils
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/vercmp.sh
31 строка
803 B
David Howells
TEST: Fix version number handling
22 ноя 2013, 03:29
22 ноя 2013, 03:29
bd9de97
Код
Авторство
О чём код?
# Commandline-driver tester for version comparison shell functions # ############################################################################### # # Copyright (C) 2013 Red Hat, Inc. All Rights Reserved. # Written by David Howells (dhowells@redhat.com) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version # 2 of the License, or (at your option) any later version. # ############################################################################### . ./version.inc.sh # # Compare versions # if [ "$1" = "" -o "$2" = "" ] then echo "Missing version parameters" >&2 exit 2 fi if version_less_than $1 $2 then echo "$1 < $2" else echo "$1 >= $2" fi