提交 72f5e3ba 作者: Jakub Sztandera

Reformat check_gx_program

License: MIT
Signed-off-by: 's avatarJakub Sztandera <kubuxu@gmail.com>
上级 cd34b3d4
......@@ -52,15 +52,14 @@ check_at_least_version() {
# Get major, minor and fix numbers for each version
MIN_MAJ=$(major_number "$MIN_VERS") || die "No major version number in '$MIN_VERS' for '$PROG_NAME'"
CUR_MAJ=$(major_number "$CUR_VERS") || die "No major version number in '$CUR_VERS' for '$PROG_NAME'"
if MIN_MIN=$(expr "$MIN_VERS" : "[^.]*\.\([^.]*\).*")
then
if MIN_MIN=$(expr "$MIN_VERS" : "[^.]*\.\([^.]*\).*"); then
MIN_FIX=$(expr "$MIN_VERS" : "[^.]*\.[^.]*\.\([^.]*\).*") || MIN_FIX="0"
else
MIN_MIN="0"
MIN_FIX="0"
fi
if CUR_MIN=$(expr "$CUR_VERS" : "[^.]*\.\([^.]*\).*")
then
if CUR_MIN=$(expr "$CUR_VERS" : "[^.]*\.\([^.]*\).*"); then
CUR_FIX=$(expr "$CUR_VERS" : "[^.]*\.[^.]*\.\([^.]*\).*") || CUR_FIX="0"
else
CUR_MIN="0"
......@@ -80,7 +79,7 @@ check_at_least_version() {
# Check that the gx program exists
type "$GX_PROGRAM_NAME" >/dev/null || die_upgrade "Program $GX_PROGRAM_NAME is not installed!"
type "$GX_PROGRAM_NAME" >/dev/null 2>&1 || die_upgrade "Program $GX_PROGRAM_NAME is not installed!"
# Check the gx program version
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论