This commit is contained in:
kxtzownsu 2024-03-10 00:21:24 -05:00
parent 58b51136fa
commit b1121d1dd3
2 changed files with 7 additions and 4 deletions

View File

@ -29,6 +29,8 @@ echo "some of this builder would have been impossible without it, at least with
echo "Press ENTER to continue, CTRL+C to quit" echo "Press ENTER to continue, CTRL+C to quit"
read -r read -r
sfdisk -d "$IMG" > pre-mod.txt
#we need this before we re-create stateful #we need this before we re-create stateful
STATE_START=$(cgpt show "$IMG" | grep "STATE" | awk '{print $1}') STATE_START=$(cgpt show "$IMG" | grep "STATE" | awk '{print $1}')
shrink_partitions "$IMG" shrink_partitions "$IMG"
@ -41,6 +43,9 @@ fdisk "$LOOPDEV" <<EOF
w w
EOF EOF
inject_root
safesync
shrink_root shrink_root
safesync safesync
@ -53,21 +58,19 @@ safesync
inject_stateful inject_stateful
safesync safesync
inject_root
safesync
cleanup cleanup
safesync safesync
log "pre-truncate" log "pre-truncate"
fdisk -l "$IMG" fdisk -l "$IMG"
sfdisk -d "$IMG" > pre-truncate.txt
truncate_image "$IMG" truncate_image "$IMG"
safesync safesync
log "post-truncate" log "post-truncate"
fdisk -l "$IMG" fdisk -l "$IMG"
sfdisk -d "$IMG" > post-truncate.txt
log "Done building!" log "Done building!"