Refactored; Removed sudo from rm win/

This commit is contained in:
cvoges12 2021-09-28 17:38:12 +00:00
parent 884f96dcd1
commit 53e6b06cde
3 changed files with 23 additions and 21 deletions

13
src/extract_iso.sh Executable file
View file

@ -0,0 +1,13 @@
#!/bin/sh
# mount iso
sudo mkdir -p /mnt/iso
sudo mount -o loop Win10* /mnt/iso
# copy iso files
mkdir -p win
cp -r /mnt/iso/* win/
# clean up mount
sudo umount /mnt/iso
sudo rm -rf /mnt/iso

View file

@ -1,15 +1,4 @@
#!/bin/sh #!/bin/sh
sudo src/iso.sh src/iso.sh
# add answerfile
cp data/autounattend.xml win/
# install mkisofs
# recreate iso
mkisofs --allow-limited-size -o win.iso win
# clean up iso extract
sudo rm -rf win
src/vm.sh src/vm.sh

View file

@ -1,13 +1,13 @@
#!/bin/sh #!/bin/sh
# extract iso src/extract_iso.sh
mkdir -p /mnt/iso
mount -o loop Win10* /mnt/iso
# copy iso files # add answerfile
mkdir -p win cp data/autounattend.xml win/
cp -r /mnt/iso/* win/
# clean up mount # install mkisofs
umount /mnt/iso # recreate iso
rm -rf /mnt/iso mkisofs --allow-limited-size -o win.iso win
# clean up iso extract
rm -rf win