Avoid use of non-portable echo -n in grub-mkconfig
util/grub-mkconfig_lib.in(version_test_gt): "echo -n" is not really needed, final newline is stripped by command substitution. util/grub.d/10_kfreebsd.in, util/grub.d/10_linux.in, util/grub.d/20_linux_xen.in: change how list is built, to avoid echo -n completely. util/grub.d/30_os-prober.in: add spaces to printed line directly Closes 43668.
This commit is contained in:
parent
06eadf5ebf
commit
cdae5bf208
6 changed files with 36 additions and 19 deletions
|
@ -246,8 +246,8 @@ version_test_gt ()
|
|||
fi
|
||||
case "$version_test_gt_a:$version_test_gt_b" in
|
||||
*.old:*.old) ;;
|
||||
*.old:*) version_test_gt_a="`echo -n "$version_test_gt_a" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=gt ;;
|
||||
*:*.old) version_test_gt_b="`echo -n "$version_test_gt_b" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=ge ;;
|
||||
*.old:*) version_test_gt_a="`echo "$version_test_gt_a" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=gt ;;
|
||||
*:*.old) version_test_gt_b="`echo "$version_test_gt_b" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=ge ;;
|
||||
esac
|
||||
version_test_numeric "$version_test_gt_a" "$version_test_gt_cmp" "$version_test_gt_b"
|
||||
return "$?"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue