Last active
June 29, 2017 08:25
-
-
Save bochoven/0240cc4533afa873658834975affd88e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Script that creates two installer packages with the same destination app | |
# but different CFBundleIdentifiers. | |
# These trigger in macOS installer the creation of a .localized version | |
mkdir -p /tmp/test/Applications/Test.app/Contents | |
/usr/libexec/plistbuddy -c "Add :CFBundleIdentifier string macadmins.test.1" /tmp/test/Applications/Test.app/Contents/Info.plist | |
pkgbuild --root /tmp/test /tmp/test.1.pkg | |
/usr/libexec/plistbuddy -c "Set :CFBundleIdentifier string macadmins.test.2" /tmp/test/Applications/Test.app/Contents/Info.plist | |
pkgbuild --root /tmp/test /tmp/test.2.pkg | |
sudo installer -pkg /tmp/test.1.pkg -tgt / | |
sudo installer -pkg /tmp/test.2.pkg -tgt / |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment