mkdir 使用 -p

如脚本运行出错,手动再执行,mkdir 建立已创建的文件夹会报错,添加了 -p 则不会
This commit is contained in:
bin456789 2023-06-21 23:34:25 +08:00
parent c3cbef6a47
commit 90b2c0e0e1
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -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' \