Script: Quickly create package from simple application bundle

athomson
New Contributor III

I wrote a script I have found to be very useful for quickly making component package files from simple application bundles that are typically downloaded within disk images or zip files. The resulting package files are NOT product archives suitable for uploading to Apple, but are ideal for deployments via JAMF PRO. Use at your own risk.

create_package_from_app_bundle.sh

7 REPLIES 7

scottb
Honored Contributor

Cool @athomson . Seems to work nicely. Thanks for sharing...

skinford
Contributor III

@athomson Good Afternoon!

Great scripts thank you for your work posted here.

Please forgive my ignorance with this script. I can't seem to get it working and not sure what I'm doing wrong. I have put Terminal in ROOT user mode and still it will not work. Keeps saying permision denied. What am I doing wrong? I would love to use this one and have already implemented the Hard Drive wipe one in Casper and will test it this coming week.

Have a very great day my friend and thank you for all that you share!

I moved a bit further along but I now get this error when running it:
ERROR: Unable to set permissions.
Exited with code #126 after 7 second(s).

Any clue? Have a great day!

hjcao
Contributor

@skinford

Have you tried running:

sudo sh /pathtowhereyousavedthescript/scriptname.sh

skinford
Contributor III

@hjcao Thanks for the tip.

I did try and I still get the error. Weird It looks like it should be working. Here's my script feedback:
/Volumes/Firefox/Firefox.app
Application Name: Firefox
Application Version: 51.0.1
Application Identifier: org.mozilla.firefox
Application Source: "/Volumes/Firefox/Firefox.app"
Application Destination: "/Applications"
ERROR: Unable to set permissions.
Exited with code #126 after 4 second(s).

I found a bit more here is what the error code means: 126 - if command is found but cannot be invoked (e.g. is not executable)

skinford
Contributor III

@hjcao Thanks for the tip.

I did try and I still get the error. Weird It looks like it should be working. Here's my script feedback:
/Volumes/Firefox/Firefox.app Application Name: Firefox
Application Version: 51.0.1
Application Identifier: org.mozilla.firefox
Application Source: "/Volumes/Firefox/Firefox.app"
Application Destination: "/Applications"
ERROR: Unable to set permissions.
Exited with code #126 after 4 second(s).

marklamont
Contributor III

on github is app packager which does the same thing from either a dmg with a drag and drop install or directly from an installed app. I use it quite a lot.

skinford
Contributor III

@marklamont Good Morning!

Thank you for the tip. I downloaded it and it seems to work fine. Funny that's the way the window looked when I tried to turn @athomson script into an app using Platypus

I do appreciate the heads up. Have a great day and if anyone needs anything please let me know.