Skip to content

Commit

Permalink
Do not use dmg2img on macOS
Browse files Browse the repository at this point in the history
macOS is able to mount and attach .dmg file so no conversion to .img is
required.
  • Loading branch information
razvand committed Dec 24, 2017
1 parent b4c7591 commit e932796
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/decrypt_fs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ else
warn_if_error
fi

if [[ $OSTYPE == darwin* ]]; then
info "macOS is able to attach and mount .dmg files. Not converting $decrypted to $img"
exit 0
fi

part_num=$(dmg2img -l "$decrypted" | grep "disk image" | awk '{print $2}' | head -c 2)
debug "Extracting partition $part_num in dmg file $decrypted to filesystem image file $img ..."
debug "dmg2img -p $part_num -i $decrypted -o $img"
Expand Down

0 comments on commit e932796

Please sign in to comment.