exit 1
}
+# Load list of packages and versions.
+# They may be overridden in sysinfos.
+source ../config/packages-list
+
# Load default values
source ../config/sysinfos.default
# Load functions
source ../functions/fpkg
-# Load list of packages and versions
-source ../config/packages-list
-
# Constants for return codes
EXIT_SUCCESS=0
EXIT_WARNING=1
echo ${1} | sed "s!^.*-\([0-9]*\.[0-9]*\).*!\1!g"
}
+# Extracting the 3-digit version number from a complete package name.
+# Arg. #1: Complete package name with version
+# (ex: linux-2.6.37.1 will output 2.6.37)
+get_pkg_ver3()
+{
+ # Checking for correct number of arguments
+ if [ $# -ne 1 ]; then
+ echo "${FUNCNAME}(), wrong number of arguments: ${*}"
+ return 1
+ fi
+
+ echo ${1} | sed "s!^.*-\([0-9]*\.[0-9]*\.[0-9]*\).*!\1!g"
+}
+
# Extracting the base version number from a complete package name.
# Arg. #1: Complete package name with version (ex: gcc-3.4.4 will output 3)
get_pkg_ver_major()