Major changes:
- Changed CFBundleIdentifier to
com.hjuutilainen.MunkiAdmin
. Important: The old preferences are not migrated to the new domain. - Completely new logging with CocoaLumberJack:
- By default, MunkiAdmin writes logs to
~/Library/Logs/MunkiAdmin/
- See the Advanced pane in Preferences for logging options
- To open the current log file choose Window -> Show Current Log or press cmd-L
- By default, MunkiAdmin writes logs to
- MunkiAdmin can now extract icons from installer items in batch mode.
- See File -> Batch Extract Icons... for more information.
- Support for running custom scripts when saving
- MunkiAdmin looks for executable files (with any extension) with the following names:
- pkginfo-presave
- pkginfo-postsave
- manifest-presave
- manifest-postsave
- repository-presave
- repository-postsave
- The scripts should be saved in
<repository>/MunkiAdmin/scripts/
or~/Library/Application Support/MunkiAdmin/scripts/
. - The presave scripts can abort the save by exiting with anything other than 0.
- The pkginfo and manifest scripts are called with 2 arguments:
- $1: Full path to the pkginfo
- $2: File name of the pkginfo
- All of the scripts are called with the working directory set to the current repository root.
- See the example script below
- MunkiAdmin looks for executable files (with any extension) with the following names:
Smaller fixes and changes:
- When creating a new icon: If all selected packages are using the same icon, show the effective icon in the image view.
- Added a Configuration Profile item to the Installer Types source list section.
- Deleting packages now displays an error and tries to recover if files can't be removed. (GitHub #54).
- Don't override defaults for new items_to_copy items by default. Now that's a sentence...
Example script
A quick example of a working pkginfo-postsave script which would create a git commit every time a pkginfo is edited and saved:
#!/bin/bash
# Use the Unofficial Bash Strict Mode
# <http://redsymbol.net/articles/unofficial-bash-strict-mode/>
set -euo pipefail
IFS=$'\n\t'
FILE_PATH=$1
FILE_NAME=$2
echo "Path: ${FILE_PATH}"
echo "Name: ${FILE_NAME}"
echo "Current working directory: $(PWD)"
# Create a git commit
git add "${FILE_PATH}"
git commit -m "MunkiAdmin edited pkginfo ${FILE_NAME}"