Thanks for looking in to this. Looks simple enough .
I like the conditional approach based on input disk type,
MENDER_PARTITION_TYPE=$(disk_get_part_value ${disk_image} 1 SCHEME)
if [ "${MENDER_PARTITION_TYPE}" == "gpt" ]; then
...
Would you be able to create a pull-request for this?