Skip to content

Instantly share code, notes, and snippets.

@crowjdh
Last active November 22, 2022 08:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crowjdh/0cc00788e41e478d920b5a5970ecacd4 to your computer and use it in GitHub Desktop.
Save crowjdh/0cc00788e41e478d920b5a5970ecacd4 to your computer and use it in GitHub Desktop.

Expand pkg

$ pkgutil --expand GoogleDrive.pkg GoogleDrive.unpkg

Remove unnecessary pkg files

$ rm -rf GoogleDrive.unpkg/GARBAGE.pkg

Update GoogleDrive.unpkg/Distribution

  • Remove unnecessary entries:
    • <installer-gui-script><choices-outline><line>
    • <installer-gui-script><choice>
    • <installer-gui-script><pkg-ref>

Update pre/post install scripts

$ vim GoogleDrive.unpkg/DESIRED.pkg/Scripts/[postinstall|preinstall]

Pack 'em

$ pkgutil --flatten GoogleDrive.unpkg GoogleDrive.pkg

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment