script: fix a minor bug in launch_xenomai.sh

There a bug in substring detection, fix it.

Tracked-On: #5183
Signed-off-by: Tw <wei.tan@intel.com>
This commit is contained in:
Tw 2020-07-06 14:34:36 +08:00 committed by wenlingz
parent 54975e4629
commit 42567c9a1c
1 changed files with 1 additions and 1 deletions

View File

@ -180,7 +180,7 @@ elif [ ! -z $disk ];then
# detect partition information # detect partition information
disk_part_nr=$(basename $disk| sed 's/.*\([0-9]$\)/\1/') disk_part_nr=$(basename $disk| sed 's/.*\([0-9]$\)/\1/')
if grep -q "nvme" "$disk"; then if [[ $disk =~ "nvme" ]]; then
vdisk=/dev/nvme0n1p$disk_part_nr vdisk=/dev/nvme0n1p$disk_part_nr
else else
vdisk=/dev/sda$disk_part_nr vdisk=/dev/sda$disk_part_nr