From 76738362f1faf68f35915f8f2ca0baa8710f1983 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Sat, 27 Jan 2024 23:20:15 +0800 Subject: [PATCH] =?UTF-8?q?windows:=20=E5=BC=83=E7=94=A8=20rsync?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trans.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/trans.sh b/trans.sh index 0972c81..11f38e3 100644 --- a/trans.sh +++ b/trans.sh @@ -1859,7 +1859,7 @@ EOF } install_windows() { - apk add wimlib virt-what dmidecode rsync pev + apk add wimlib virt-what dmidecode pev # shellcheck disable=SC2154 download $iso /os/windows.iso @@ -1874,10 +1874,19 @@ install_windows() { cp -rv /iso/boot* /os/boot/efi/ cp -rv /iso/efi/ /os/boot/efi/ cp -rv /iso/sources/boot.wim /os/boot/efi/sources/ - rsync -rv --exclude=/sources/boot.wim /iso/* /os/installer/ + + if false; then + rsync -rv --exclude=/sources/boot.wim /iso/* /os/installer/ + else + cd /iso + echo 'Copying installer files...' + find . -type f -not -name boot.wim -exec cp -r --parents {} /os/installer/ \; + cd - + fi boot_wim=/os/boot/efi/sources/boot.wim else - rsync -rv /iso/* /os/installer/ + echo 'Copying installer files...' + cp -r /iso/* /os/installer/ boot_wim=/os/installer/sources/boot.wim fi