GithubHelp home page GithubHelp logo

Comments (5)

macmule avatar macmule commented on June 11, 2024

Ok.. so the issue seems to be the grep before awk, & bad assumptions I had made in that: https://github.com/macmule/AutoCasperNBI/blob/master/AutoCasperNBI/AutoCasperNBIAppDelegate.applescript#L513

Basically, a Composer captured OS.dmg contains JUST the OS partition. So hdiutil attach output looks like:

/usr/bin/hdiutil attach ~/Desktop/ComposerHD.dmg expected CRC32 $A02AE580 /dev/disk2 /Volumes/Macintosh HD 1

Whereas an AutoDMG OS.dmg outputs:

/usr/bin/hdiutil attach /Volumes/QuickStick/osx-10.10.1-14B25.hfs.dmg expected CRC32 $32279B63 /dev/disk3 GUID_partition_scheme /dev/disk3s1 EFI /dev/disk3s2 Apple_HFS /Volumes/Macintosh HD 2 /dev/disk3s3 Apple_Boot

As horrible as the below looks, it returns the correct mount path for both of the above DMGs:

/usr/bin/hdiutil attach /Volumes/QuickStick/osx-10.10.1-14B25.hfs.dmg | awk -F\"[<>]\" 'a{print $3; exit}$2==\"key\"&&$3==\"mount-point\"{a=1}'

Now we're parsing as a plist & awking out what we need, granted not anywhere near "best practice" but seems to resolve this issue.

Other attempts involved writing a plist & reading from that, but the nested dicts within the arrays gave me some grief (gist below) & with the above working.. i'll put the above into 1.1.5.

https://gist.github.com/macmule/827f8ddb8a65ddc007b2

Better/more elegant solutions welcome, as long as they can be ran within an AppleScript Objective-C app.

from autocaspernbi.

macmule avatar macmule commented on June 11, 2024

Summarised as:

alt text

from autocaspernbi.

macmule avatar macmule commented on June 11, 2024

fixed in 1.1.5

from autocaspernbi.

TGBX avatar TGBX commented on June 11, 2024

When will 1.1.5 be released?

from autocaspernbi.

macmule avatar macmule commented on June 11, 2024

Also, to add that Composer 9.7 can now capture the Recovery HD, which would have resolved this issue too.

from autocaspernbi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.