Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

unmount dmg in the start of the build #15

Merged
merged 2 commits into from

2 participants

Andrei Korzhevskii Andrey Tarantsov
Andrei Korzhevskii

try unmount dmg if it was mounted previously (e.g. developer mounted dmg, installed app and forgot to unmount it)

Andrey Korzh... added some commits
Andrey Korzhevskiy try unmount dmg if it was mounted previously (e.g. user installed app…
… and mounted dmg)
7294f51
Andrey Korzhevskiy try unmount dmg if it was mounted previously (e.g. developer mounted …
…dmg, installed app and forgot to unmount it)
65f5068
Andrey Tarantsov andreyvit merged commit 755381f into from
Andrey Tarantsov
Owner

Thanks, and sorry for the delay merging this.

Andrei Korzhevskii

Thank you! )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 10, 2013
  1. try unmount dmg if it was mounted previously (e.g. user installed app…

    Andrey Korzhevskiy authored
    … and mounted dmg)
Commits on Jan 11, 2013
  1. try unmount dmg if it was mounted previously (e.g. developer mounted …

    Andrey Korzhevskiy authored
    …dmg, installed app and forgot to unmount it)
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 0 deletions.
  1. +6 −0 create-dmg
6 create-dmg
View
@@ -137,6 +137,12 @@ hdiutil create -srcfolder "$SRC_FOLDER" -volname "${VOLUME_NAME}" -fs HFS+ -fsar
# mount it
echo "Mounting disk image..."
MOUNT_DIR="/Volumes/${VOLUME_NAME}"
+
+# try unmount dmg if it was mounted previously (e.g. developer mounted dmg, installed app and forgot to unmount it)
+echo "Unmounting disk image..."
+DEV_NAME=$(hdiutil info | egrep '^/dev/' | sed 1q | awk '{print $1}')
+test -d "${MOUNT_DIR}" && hdiutil detach "${DEV_NAME}"
+
echo "Mount directory: $MOUNT_DIR"
DEV_NAME=$(hdiutil attach -readwrite -noverify -noautoopen "${DMG_TEMP_NAME}" | egrep '^/dev/' | sed 1q | awk '{print $1}')
echo "Device name: $DEV_NAME"
Something went wrong with that request. Please try again.