moved win dump removal to after mkisofs

This commit is contained in:
cvoges12 2021-10-07 22:56:57 +00:00
parent 1868029f7b
commit 67c3139637

View file

@ -30,17 +30,21 @@ LDA="$(dumpet -i Win*.iso \
CDROM_SECTOR_SIZE=2048 CDROM_SECTOR_SIZE=2048
FLOPPY_SECTOR_SIZE=512 FLOPPY_SECTOR_SIZE=512
# number of floppy disk sectors
dd if=Win*.iso bs=${CDROM_SECTOR_SIZE} skip=${LDA} count=1 > win.dmp dd if=Win*.iso bs=${CDROM_SECTOR_SIZE} skip=${LDA} count=1 > win.dmp
FLOPPY_SECTORS="$(file win.dmp \ FLOPPY_SECTORS="$(file win.dmp \
| sed -e "s/.*sectors\ //" \ | sed -e "s/.*sectors\ //" \
| awk '{printf $1}')" | awk '{printf $1}')"
rm win.dmp
CDROM_SECTORS=`expr $FLOPPY_SECTOR_SIZE \ CDROM_SECTORS=`expr $FLOPPY_SECTOR_SIZE \
\* $FLOPPY_SECTORS \ \* $FLOPPY_SECTORS \
/ $CDROM_SECTOR_SIZE` / $CDROM_SECTOR_SIZE`
dd if=Win*.iso bs=${CDROM_SECTOR_SIZE} skip=${LDA} count=${CDROM_SECTORS} of=win_efi_boot.img
dd \
if=Win*.iso \
bs=${CDROM_SECTOR_SIZE} \
skip=${LDA} \
count=${CDROM_SECTORS} \
of=win_efi_boot.img
# install mkisofs # install mkisofs
# recreate iso # recreate iso
@ -65,9 +69,10 @@ mkisofs \
-o winsp.iso \ -o winsp.iso \
. .
mv winsp.iso ../ mv winsp.iso ..
# clean up bootsect and iso extract # clean up bootsect and iso extract
cd .. cd ..
rm -rf bootsect/ rm win.dmp
#rm -rf bootsect/
sudo rm -rf ${EXTRACT} sudo rm -rf ${EXTRACT}