Refactored; Removed sudo from rm win/
This commit is contained in:
parent
884f96dcd1
commit
53e6b06cde
3 changed files with 23 additions and 21 deletions
13
src/extract_iso.sh
Executable file
13
src/extract_iso.sh
Executable 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
|
13
src/init.sh
13
src/init.sh
|
@ -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
|
||||||
|
|
18
src/iso.sh
18
src/iso.sh
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue