浏览代码

Fix dry run

Bohan Yang 4 年之前
父节点
当前提交
47c7b051cf
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      debi.sh

+ 2 - 0
debi.sh

@@ -808,10 +808,12 @@ EOF
 }
 
 mkrelpath=$installer_directory
+[ "$dry_run" = true ] && mkrelpath=/boot
 installer_directory=$(grub-mkrelpath "$mkrelpath" 2> /dev/null) ||
 installer_directory=$(grub2-mkrelpath "$mkrelpath" 2> /dev/null) || {
     err 'Could not find "grub-mkrelpath" or "grub2-mkrelpath" command'
 }
+[ "$dry_run" = true ] && installer_directory="$installer_directory/debian-$suite"
 
 kernel_params="$kernel_params lowmem/low=1"