Whamcloud - gitweb
LU-3968 lbuild: Extend script with build for Xeon Phi card
[fs/lustre-release.git] / contrib / lbuild / find_linux_rpms
index b84d156..44a7b97 100644 (file)
@@ -20,6 +20,10 @@ TOPDIR=$PWD
 KERNELRPMSDIR="$1"
 
 DISTRO=$(autodetect_distro)
+# remove minor version only for rhel and oel
+[[ $DISTRO =~ "el-" ]] && DISTRO=${DISTRO%%.*}
+# remove separator
+DISTRO=${DISTRO/-/}
 
 source $LBUILD_DIR/lbuild-$DISTRO