macosinstallationpackagemaker

Packagemaker for copy files


I'm making an application and some default files for the entire organization and these files should be copied in the directory /Users/<username>/Library/MyDirectory/ in every machine. I want to deploy this application and files as an installer package using packagemaker. I tried by dragging the folder containing default files to the and setting destination to /Library/MyDirectory but its not creating the directory named MyDirectory and copying files to it. I tried by adding a preinstall.sh script with following code to create MyDirectory

#!/bin/sh

USER_HOME=$(eval echo ~${SUDO_USER})
TEMP_DIR="${USER_HOME}/Library/MyDirectory"
mkdir "${TEMP_DIR}"

After installing the package MyDirectory is creaing but the files not copied to that directory


Solution

  • Ditch Packagemaker. Try Packages or pkgbuild with luggage.