Created
August 31, 2021 14:33
-
-
Save stevewood-tx/f9d57f624083a2e5fe50c438fed04067 to your computer and use it in GitHub Desktop.
Package Build Script
This file contains 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/bash | |
## basic package, not signed. Provide name you want and version as command line arguments. | |
args=("$@") | |
pkgName="${args[0]}" | |
echo "Supply the package name and version: build.sh <pkgname> <version>" | |
# get date for package name | |
myDate=`date +%Y%m%d` | |
# Name of the package. | |
NAME="${pkgName}" | |
# Once installed the identifier is used as the filename for a receipt files in /var/db/receipts/. | |
IDENTIFIER="com.omnicom.$NAME" | |
# Package version number. | |
VERSION="${args[1]}" | |
# Remove any unwanted .DS_Store files. | |
find ROOT/ -name '*.DS_Store' -type f -delete | |
# Build package. | |
/usr/bin/pkgbuild \ | |
--root ROOT/ \ | |
--scripts scripts/ \ | |
--identifier "$IDENTIFIER" \ | |
--version "$VERSION" \ | |
"Output/$NAME-$VERSION-$myDate.pkg" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment