File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ curl -fSL --progress-bar "$DOWNLOAD_URL" -o "$DMG_PATH"
3737
3838# ── Mount & copy ──
3939info " Installing to ${INSTALL_DIR} ..."
40- MOUNT_POINT=$( hdiutil attach " $DMG_PATH " -nobrowse -quiet | tail -1 | sed ' s/.* //' )
40+ MOUNT_POINT=$( hdiutil attach " $DMG_PATH " -nobrowse | tail -1 | sed ' s/.* //' )
41+ [[ -n " $MOUNT_POINT " ]] || err " Failed to resolve mount point."
42+ [[ -d " ${MOUNT_POINT} /${APP_NAME} " ]] || err " Mounted DMG does not contain ${APP_NAME} ."
4143
4244# Remove old version if exists
4345if [[ -d " ${INSTALL_DIR} /${APP_NAME} " ]]; then
4749cp -R " ${MOUNT_POINT} /${APP_NAME} " " ${INSTALL_DIR} /"
4850
4951# Unmount
50- hdiutil detach " $MOUNT_POINT " -quiet 2 > /dev/null || true
52+ hdiutil detach " $MOUNT_POINT " > /dev/null 2>&1 || true
5153
5254# ── Cleanup ──
5355rm -rf " $TMPDIR_INSTALL "
You can’t perform that action at this time.
0 commit comments