13
0

Fix trap error case

At this point TMPDMG already has .dmg added to it and
the original mktemp file was removed above.
This commit is contained in:
Todd Naugle 2022-02-04 15:18:29 -06:00
parent 617697a823
commit d2a5fa2d9f

View File

@ -992,7 +992,7 @@ mkdir -p "$MNTPATH"
TMPDMG="${TMPDMG}.dmg"
trap "rm -rf $MNTPATH $TMPDMG ${TMPDMG}.dmg $ICNSTMP" EXIT
trap "rm -rf $MNTPATH $TMPDMG $ICNSTMP" EXIT
hdiutil create -megabytes $DMGMEGABYTES -fs HFS+ -volname "${VOLNAME}" "$TMPDMG"
DiskDevice=$(hdid -nomount "$TMPDMG" | grep Apple_HFS | cut -f 1 -d ' ')