From 90b2c0e0e1351663fa66cf163fddeedb38ea9674 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Wed, 21 Jun 2023 23:34:25 +0800 Subject: [PATCH] =?UTF-8?q?mkdir=20=E4=BD=BF=E7=94=A8=20-p?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 如脚本运行出错,手动再执行,mkdir 建立已创建的文件夹会报错,添加了 -p 则不会 --- trans.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/trans.sh b/trans.sh index 8d82ae0..1078e46 100644 --- a/trans.sh +++ b/trans.sh @@ -275,7 +275,7 @@ mount /dev/disk/by-label/installer /os/installer # shellcheck disable=SC2154 if [ "$distro" = "windows" ]; then download $iso /os/windows.iso - mkdir /iso + mkdir -p /iso mount /os/windows.iso /iso # 变量名 使用场景 @@ -325,7 +325,7 @@ if [ "$distro" = "windows" ]; then esac download https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/$dir/virtio-win.iso /os/virtio-win.iso - mkdir /virtio + mkdir -p /virtio mount /os/virtio-win.iso /virtio fi @@ -389,12 +389,12 @@ EOF # unix2dos /os/installer/sources/ei.cfg # 挂载 boot.wim - mkdir /wim + mkdir -p /wim wimmountrw $boot_wim 2 /wim/ # virtio 驱动 if [ -d /virtio ]; then - mkdir /wim/virtio + mkdir -p /wim/virtio find /virtio \ -ipath "*/$sys/$arch/*" \ -not -iname '*.pdb' \