Skip to content

Commit

Permalink
Add MacOS PKG preinstall script
Browse files Browse the repository at this point in the history
  • Loading branch information
dainnilsson committed Jun 24, 2024
1 parent 6b1ad4f commit 99ede24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion resources/macos/make_pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mkdir -p pkg/root/usr/local/bin pkg/comp
cp -r $SOURCE_DIR pkg/root/usr/local/
(cd pkg/root/usr/local/bin && ln -s ../ykman/ykman)

pkgbuild --root="pkg/root" --identifier "com.yubico.yubikey-manager" --version "$RELEASE_VERSION" "pkg/comp/ykman.pkg"
pkgbuild --root="pkg/root" --scripts="pkg_scripts" --identifier "com.yubico.yubikey-manager" --version "$RELEASE_VERSION" "pkg/comp/ykman.pkg"

productbuild --package-path "pkg/comp" --distribution "distribution.xml" "$PKG"

Expand Down
4 changes: 4 additions & 0 deletions resources/macos/pkg_scripts/preinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

# Delete existing installation
rm -rf /usr/local/ykman

0 comments on commit 99ede24

Please sign in to comment.