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
sudo 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/iso.sh
src/vm.sh

View file

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