├── .gitignore ├── Completed ├── 2.1-BuildingPackages │ ├── BoringDesktop-1.0 │ │ ├── buildBoringDesktopPkg.sh │ │ └── payload │ │ │ └── BoringBlueDesktop.png │ ├── BoringDesktop-2.0 │ │ ├── buildBoringDesktopPkg.sh │ │ └── payload │ │ │ └── BoringRedDesktop.png │ ├── PolicyBanner │ │ ├── buildPolicyBannerPkg.sh │ │ └── payload │ │ │ └── PolicyBanner.rtf │ └── SourceCodePro │ │ ├── buildSourceCodeProPkg.sh │ │ └── payload │ │ └── Library │ │ └── Fonts │ │ └── COPY FONT FILES HERE!! └── 2.2-InstallationScripts │ └── SourceCodePro │ ├── PackageInfo.xml │ ├── buildSourceCodeProPkg.sh │ ├── payload │ └── Library │ │ └── Fonts │ │ └── COPY FONT FILES HERE!! │ └── scripts │ ├── postinstall │ └── preinstall ├── LICENSE.txt ├── Packaging-Command-Reference.pdf ├── README.md └── Resources ├── BBEdit ├── BBEdit 11.webloc ├── BBEditDistribution-final.xml ├── BBEditDistribution.xml ├── buildBBEditCLIToolsPkg.sh ├── logGen.webloc ├── pkgGen.webloc ├── postinstall └── postinstall-final ├── BoringDesktop ├── BoringBlueDesktop.png ├── BoringRedDesktop.png ├── buildBoringDesktopDistributionPkg.sh ├── buildBoringDesktopPkg.sh ├── buildBoringDesktopUninstall.sh └── uninstall-scripts │ └── postinstall ├── Download Firefox.webloc ├── Download Silverlight Installer.webloc ├── Download iTunes Installer.webloc ├── EnableARD ├── buildEnableARDPkg.sh └── postinstall ├── EnableSSH ├── buildEnableSSHPkg.sh └── postinstall ├── EnableScreenSharing ├── buildEnableScreenSharingPkg.sh └── scripts │ └── postinstall ├── GoogleChrome ├── Download Google Chrome.webloc ├── Google Chrome Master Preferences ├── GoogleChrome.mobileconfig ├── buildGoogleChromeConfigurationPkg-v0.1.sh ├── buildGoogleChromeConfigurationPkg-v0.2.sh ├── postinstall └── postinstall-final.sh ├── InstallerUI ├── Distribution.xml ├── Resources │ ├── Conclusion.rtf │ ├── License.rtf │ ├── Readme.rtf │ ├── Welcome.rtf │ └── shebang.png └── buildInstallerUIDistPkg.sh ├── Office2016 ├── buildOffice2016Pkg.sh ├── choicechangesMSOffice.plist ├── postinstall └── ‎macadmins.software.webloc ├── PolicyBanner ├── Policy Banners-Apple Support.webloc ├── PolicyBanner.rtf └── buildPolicyBannerPkg.sh └── SourceCodePro ├── PackageInfo.xml ├── adobe-fonts-source-code-pro.webloc ├── build-info.plist ├── buildSourceCodeProPkg-final.sh ├── buildSourceCodeProPkg.sh ├── postinstall └── preinstall /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | *.pkg 4 | -------------------------------------------------------------------------------- /Completed/2.1-BuildingPackages/BoringDesktop-1.0/buildBoringDesktopPkg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="BoringDesktop" 4 | version="1.0" 5 | install_location="/Library/Desktop Pictures/" 6 | identifier="com.example.${pkgname}" 7 | 8 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 9 | 10 | projectfolder=$(dirname "$0") 11 | 12 | pkgbuild --root "${projectfolder}/payload" \ 13 | --identifier "${identifier}" \ 14 | --version "${version}" \ 15 | --install-location "${install_location}" \ 16 | "${projectfolder}/${pkgname}-${version}.pkg" 17 | -------------------------------------------------------------------------------- /Completed/2.1-BuildingPackages/BoringDesktop-1.0/payload/BoringBlueDesktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptingosx/PackagesForAppleAdministrators/2c8afabe1ebf72343f41ecd966e92d98a3f1c42b/Completed/2.1-BuildingPackages/BoringDesktop-1.0/payload/BoringBlueDesktop.png -------------------------------------------------------------------------------- /Completed/2.1-BuildingPackages/BoringDesktop-2.0/buildBoringDesktopPkg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="BoringDesktop" 4 | version="2.0" 5 | install_location="/Library/Desktop Pictures/" 6 | identifier="com.example.${pkgname}" 7 | 8 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 9 | 10 | projectfolder=$(dirname "$0") 11 | 12 | pkgbuild --root "${projectfolder}/payload" \ 13 | --identifier "${identifier}" \ 14 | --version "${version}" \ 15 | --install-location "${install_location}" \ 16 | "${projectfolder}/${pkgname}-${version}.pkg" 17 | -------------------------------------------------------------------------------- /Completed/2.1-BuildingPackages/BoringDesktop-2.0/payload/BoringRedDesktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptingosx/PackagesForAppleAdministrators/2c8afabe1ebf72343f41ecd966e92d98a3f1c42b/Completed/2.1-BuildingPackages/BoringDesktop-2.0/payload/BoringRedDesktop.png -------------------------------------------------------------------------------- /Completed/2.1-BuildingPackages/PolicyBanner/buildPolicyBannerPkg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="PolicyBanner" 4 | version="1.0" 5 | install_location="/Library/Security/" 6 | identifier="com.example.${pkgname}" 7 | 8 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 9 | 10 | projectfolder=$(dirname "$0") 11 | 12 | pkgbuild --root "${projectfolder}/payload" \ 13 | --identifier "${identifier}" \ 14 | --version "${version}" \ 15 | --install-location "${install_location}" \ 16 | "${projectfolder}/${pkgname}-${version}.pkg" 17 | -------------------------------------------------------------------------------- /Completed/2.1-BuildingPackages/PolicyBanner/payload/PolicyBanner.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf760 2 | {\fonttbl\f0\froman\fcharset0 Palatino-Roman;\f1\fswiss\fcharset0 Helvetica;} 3 | {\colortbl;\red255\green255\blue255;\red186\green18\blue10;\red0\green0\blue0;} 4 | {\*\expandedcolortbl;;\cssrgb\c78597\c14701\c2238;\csgenericrgb\c0\c0\c0;} 5 | \paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0 6 | \deftab920 7 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab920\sl360\slmult1\qc\partightenfactor0 8 | 9 | \f0\fs160 \cf2 \expnd0\expndtw0\kerning0 10 | Scripting OS X\ 11 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab920\sl360\slmult1\partightenfactor0 12 | 13 | \f1\fs48 \cf3 \ 14 | I have read an understood the End User Policy!\ 15 | \ 16 | (Yes, really!)\ 17 | } -------------------------------------------------------------------------------- /Completed/2.1-BuildingPackages/SourceCodePro/buildSourceCodeProPkg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="SourceCodePro" 4 | version="2.030" # use the version from your download 5 | install_location="/" 6 | identifier="com.example.${pkgname}" 7 | 8 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 9 | 10 | projectfolder=$(dirname "$0") 11 | 12 | pkgbuild --root "${projectfolder}/payload" \ 13 | --identifier "${identifier}" \ 14 | --version "${version}" \ 15 | --install-location "${install_location}" \ 16 | "${projectfolder}/${pkgname}-${version}.pkg" 17 | -------------------------------------------------------------------------------- /Completed/2.1-BuildingPackages/SourceCodePro/payload/Library/Fonts/COPY FONT FILES HERE!!: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptingosx/PackagesForAppleAdministrators/2c8afabe1ebf72343f41ecd966e92d98a3f1c42b/Completed/2.1-BuildingPackages/SourceCodePro/payload/Library/Fonts/COPY FONT FILES HERE!! -------------------------------------------------------------------------------- /Completed/2.2-InstallationScripts/SourceCodePro/PackageInfo.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Completed/2.2-InstallationScripts/SourceCodePro/buildSourceCodeProPkg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="SourceCodePro" 4 | version="2.030d" # use the version from your download 5 | install_location="/" 6 | identifier="com.example.${pkgname}" 7 | 8 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 9 | 10 | projectfolder=$(dirname "$0") 11 | 12 | pkgbuild --root "${projectfolder}/payload" \ 13 | --identifier "${identifier}" \ 14 | --version "${version}" \ 15 | --install-location "${install_location}" \ 16 | --scripts "${projectfolder}/scripts" \ 17 | --info "${projectfolder}/PackageInfo.xml" \ 18 | "${projectfolder}/${pkgname}-${version}.pkg" 19 | -------------------------------------------------------------------------------- /Completed/2.2-InstallationScripts/SourceCodePro/payload/Library/Fonts/COPY FONT FILES HERE!!: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptingosx/PackagesForAppleAdministrators/2c8afabe1ebf72343f41ecd966e92d98a3f1c42b/Completed/2.2-InstallationScripts/SourceCodePro/payload/Library/Fonts/COPY FONT FILES HERE!! -------------------------------------------------------------------------------- /Completed/2.2-InstallationScripts/SourceCodePro/scripts/postinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # SourceCodePro postinstall script 4 | 5 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 6 | 7 | # run only if installing on current system 8 | if [ "$3" = "/" ]; then 9 | # use atsutil to clear the font cache 10 | atsutil databases -remove 11 | fi 12 | -------------------------------------------------------------------------------- /Completed/2.2-InstallationScripts/SourceCodePro/scripts/preinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # SourceCodePro preinstall script 4 | 5 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 6 | 7 | # find and delete any SourceCodePro file in any user folder 8 | 9 | find "$3"/Users/*/Library/Fonts -iname "SourceCodePro*.?tf" -delete 10 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2016-2018 Armin Briegel 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 4 | 5 | http://www.apache.org/licenses/LICENSE-2.0 6 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 7 | -------------------------------------------------------------------------------- /Packaging-Command-Reference.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptingosx/PackagesForAppleAdministrators/2c8afabe1ebf72343f41ecd966e92d98a3f1c42b/Packaging-Command-Reference.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PackagesForAppleAdministrators 2 | 3 | Resources and Scripts for the iBook: [Packages for Apple Administrators](https://geo.itunes.apple.com/us/book/packaging-for-apple-administrators/id1173928620?ls=1&mt=11&at=1001lpyX) 4 | 5 | These are the resources and scripts for the iBook "Packages for Apple Administrators". Unlike the book these resources are licensed under the Apache 2.0 License so you can use and adapt these for your own uses. 6 | -------------------------------------------------------------------------------- /Resources/BBEdit/BBEdit 11.webloc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptingosx/PackagesForAppleAdministrators/2c8afabe1ebf72343f41ecd966e92d98a3f1c42b/Resources/BBEdit/BBEdit 11.webloc -------------------------------------------------------------------------------- /Resources/BBEdit/BBEditDistribution-final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | BBEdit (example.com) 4 | BBEdit-11.6.2.pkg 5 | BBEditCLITools-11.6.2.pkg 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Resources/BBEdit/BBEditDistribution.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | BBEdit-11.6.1.pkg 4 | BBEditCLITools-11.6.1.pkg 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Resources/BBEdit/buildBBEditCLIToolsPkg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="BBEditCLITools" 4 | version="11.6.2" 5 | identifier="com.example.${pkgname}" 6 | 7 | PATH=/usr/bin:/bin:/usr/sbin:/sbin export PATH 8 | 9 | projectfolder=$(dirname "$0") 10 | 11 | pkgbuild --root "${projectfolder}/payload" \ 12 | --identifier "${identifier}" \ 13 | --version "${version}" \ 14 | --install-location "/" \ 15 | "${projectfolder}/${pkgname}-${version}.pkg" 16 | -------------------------------------------------------------------------------- /Resources/BBEdit/logGen.webloc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptingosx/PackagesForAppleAdministrators/2c8afabe1ebf72343f41ecd966e92d98a3f1c42b/Resources/BBEdit/logGen.webloc -------------------------------------------------------------------------------- /Resources/BBEdit/pkgGen.webloc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptingosx/PackagesForAppleAdministrators/2c8afabe1ebf72343f41ecd966e92d98a3f1c42b/Resources/BBEdit/pkgGen.webloc -------------------------------------------------------------------------------- /Resources/BBEdit/postinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # postinstall script to load BBEdit Privileged helper tool 4 | 5 | PATH=/usr/bin:/bin:/usr/sbin:/sbin export PATH 6 | 7 | # launch helper tool Daemon if installing on boot volume 8 | if [ "$3" = "/" ]; then 9 | launchDaemon="/Library/LaunchDaemons/com.barebones.authd.plist" 10 | 11 | # check if the launchd plist file exists 12 | if [ -f "${launchDaemon}" ]; then 13 | # finally, load the plist 14 | launchctl load "${launchDaemon}" 15 | else 16 | echo "LaunchDaemon not found at path: ${launchDaemon}" 17 | fi 18 | fi 19 | -------------------------------------------------------------------------------- /Resources/BBEdit/postinstall-final: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # postinstall script to install bbedit command line tools 4 | 5 | PATH=/usr/bin:/bin:/usr/sbin:/sbin export PATH 6 | 7 | target="$3" 8 | 9 | # the symlinks are created on the target volume 10 | binDir="${target}/usr/local/bin" 11 | manDir="${target}/usr/local/share/man/man1" 12 | # but point to the absolute path boot volume 13 | binSrcDir="/Applications/BBEdit.app/Contents/Helpers" 14 | manSrcDir="/Applications/BBEdit.app/Contents/Resources" 15 | 16 | # function to create a symlink 17 | symlink () { # srcdir destdir [srcItem] item 18 | # even though the links point to the absolute path 19 | # we need to check for existence on the target volume 20 | if [ -e "${target}/$1/$3" ]; then 21 | if [ ! -z "$4" ]; then 22 | ln -sf "$1/$3" "$2/$4" 23 | else 24 | ln -sf "$1/$3" "$2/$3" 25 | fi 26 | else 27 | echo "no file: $1/$3" 28 | fi 29 | } 30 | 31 | # function to create a dir with mode 32 | createDir() { # path mode 33 | if [ ! -d "$1" ]; then 34 | mkdir -p "$1" 35 | chmod "$2" "$1" 36 | fi 37 | } 38 | 39 | # sanity check for root user 40 | if [ "$(whoami)" != "root" ]; then 41 | echo "Run this script as root." 42 | exit 1 43 | fi 44 | 45 | # create destination dirs if necessary 46 | createDir "${binDir}" 755 47 | createDir "${manDir}" 755 48 | 49 | # create bbedit links 50 | symlink "${binSrcDir}" "${binDir}" "bbedit_tool" "bbedit" 51 | symlink "${manSrcDir}" "${manDir}" "bbedit.1" 52 | 53 | # create links to other tools 54 | for item in bbfind bbdiff bbresults; do 55 | symlink "${binSrcDir}" "${binDir}" "${item}" 56 | symlink "${manSrcDir}" "${manDir}" "${item}.1" 57 | done 58 | 59 | # copy helper tool 60 | helperTool="${target}/Applications/BBEdit.app/Contents/Library/LaunchServices/com.barebones.authd" 61 | helperToolsDir="${target}/Library/PrivilegedHelperTools/" 62 | if [ -e "${helperTool}" ]; then 63 | createDir "${helperToolsDir}" 1755 64 | cp "${helperTool}" "${helperToolsDir}" 65 | chown root:wheel "${helperToolsDir}/com.barebones.authd" 66 | chmod 755 "${helperToolsDir}/com.barebones.authd" 67 | fi 68 | 69 | # launch helper tool Daemon if installing on boot volume 70 | if [ "${target}" = "/" ]; then 71 | launchDaemon="/Library/LaunchDaemons/com.barebones.authd.plist" 72 | 73 | # check if the launchd plist file exists 74 | if [ -f "${launchDaemon}" ]; then 75 | # finally, load the plist 76 | launchctl load "${launchDaemon}" 77 | else 78 | echo "LaunchDaemon not found at path: ${launchDaemon}" 79 | fi 80 | fi 81 | -------------------------------------------------------------------------------- /Resources/BoringDesktop/BoringBlueDesktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptingosx/PackagesForAppleAdministrators/2c8afabe1ebf72343f41ecd966e92d98a3f1c42b/Resources/BoringDesktop/BoringBlueDesktop.png -------------------------------------------------------------------------------- /Resources/BoringDesktop/BoringRedDesktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptingosx/PackagesForAppleAdministrators/2c8afabe1ebf72343f41ecd966e92d98a3f1c42b/Resources/BoringDesktop/BoringRedDesktop.png -------------------------------------------------------------------------------- /Resources/BoringDesktop/buildBoringDesktopDistributionPkg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="BoringDesktop" 4 | version="2.0" 5 | identifier="com.example.${pkgname}" 6 | install_location="/Library/Desktop Pictures/" 7 | 8 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 9 | 10 | projectfolder=$(dirname "$0") 11 | 12 | # build the component package 13 | pkgbuild --root "${projectfolder}/payload" \ 14 | --identifier "${identifier}" \ 15 | --version "${version}" \ 16 | --ownership recommended \ 17 | --install-location "${install_location}" \ 18 | "${projectfolder}/${pkgname}.pkg" 19 | 20 | # build the distribution package 21 | productbuild --package "${projectfolder}/${pkgname}.pkg" \ 22 | "${projectfolder}/${pkgname}-${version}.pkg" 23 | 24 | # remove temporary component package file 25 | rm "${projectfolder}/${pkgname}.pkg" 26 | -------------------------------------------------------------------------------- /Resources/BoringDesktop/buildBoringDesktopPkg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="BoringDesktop" 4 | version="1.0" 5 | install_location="/Library/Desktop Pictures/" 6 | identifier="com.example.${pkgname}" 7 | 8 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 9 | 10 | projectfolder=$(dirname "$0") 11 | 12 | pkgbuild --root "${projectfolder}/payload" \ 13 | --identifier "${identifier}" \ 14 | --version "${version}" \ 15 | --install-location "${install_location}" \ 16 | "${projectfolder}/${pkgname}-${version}.pkg" 17 | -------------------------------------------------------------------------------- /Resources/BoringDesktop/buildBoringDesktopUninstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="BoringDesktop-Uninstall" 4 | version="2.0" 5 | identifier="com.example.${pkgname}" 6 | 7 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 8 | 9 | projectfolder=$(dirname "$0") 10 | 11 | pkgbuild --nopayload \ 12 | --scripts "${projectfolder}/uninstall-scripts" \ 13 | --identifier "${identifier}" \ 14 | --version "${version}" \ 15 | "${projectfolder}/${pkgname}-${version}.pkg" 16 | -------------------------------------------------------------------------------- /Resources/BoringDesktop/uninstall-scripts/postinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 4 | 5 | # removes files installed by the BoringDesktop installers 6 | 7 | install_location="$3/Library/Desktop Pictures/" 8 | 9 | rm -f "$install_location/BoringRedDesktop.png" 10 | rm -f "$install_location/BoringBlueDesktop.png" 11 | 12 | # forget the installer package receipt 13 | 14 | if [ "$3" = "/" ]; then 15 | pkgutil --forget "com.example.BoringDesktop" 16 | fi 17 | -------------------------------------------------------------------------------- /Resources/Download Firefox.webloc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptingosx/PackagesForAppleAdministrators/2c8afabe1ebf72343f41ecd966e92d98a3f1c42b/Resources/Download Firefox.webloc -------------------------------------------------------------------------------- /Resources/Download Silverlight Installer.webloc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptingosx/PackagesForAppleAdministrators/2c8afabe1ebf72343f41ecd966e92d98a3f1c42b/Resources/Download Silverlight Installer.webloc -------------------------------------------------------------------------------- /Resources/Download iTunes Installer.webloc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptingosx/PackagesForAppleAdministrators/2c8afabe1ebf72343f41ecd966e92d98a3f1c42b/Resources/Download iTunes Installer.webloc -------------------------------------------------------------------------------- /Resources/EnableARD/buildEnableARDPkg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="EnableARD" 4 | version="1.0" 5 | identifier="com.example.${pkgname}" 6 | 7 | PATH=/usr/bin:/bin:/usr/sbin:/sbin export PATH 8 | 9 | projectfolder=$(dirname "$0") 10 | 11 | pkgbuild --nopayload \ 12 | --identifier "${identifier}" \ 13 | --version "${version}" \ 14 | --scripts "${projectfolder}/scripts" \ 15 | "${projectfolder}/${pkgname}-${version}.pkg" 16 | -------------------------------------------------------------------------------- /Resources/EnableARD/postinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # EnableARD postinstall script 4 | 5 | PATH=/usr/bin:/bin:/usr/sbin:/sbin export PATH 6 | 7 | kickstart="/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart" 8 | 9 | if [ "$3" = "/" ]; then 10 | "${kickstart}" -activate -configure -access -on \ 11 | -users localadmin -privs -all \ 12 | -restart -agent -menu 13 | fi 14 | -------------------------------------------------------------------------------- /Resources/EnableSSH/buildEnableSSHPkg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="EnableSSH" 4 | version="1.0" 5 | identifier="com.example.${pkgname}" 6 | 7 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 8 | 9 | projectfolder=$(dirname "$0") 10 | 11 | pkgbuild --nopayload \ 12 | --identifier "${identifier}" \ 13 | --version "${version}" \ 14 | --scripts "${projectfolder}/scripts" \ 15 | "${projectfolder}/${pkgname}-${version}.pkg" 16 | -------------------------------------------------------------------------------- /Resources/EnableSSH/postinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # EnableSSH postinstall script 4 | 5 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 6 | 7 | if [ "$3" = "/" ]; then 8 | systemsetup -setRemoteLogin on 9 | fi 10 | -------------------------------------------------------------------------------- /Resources/EnableScreenSharing/buildEnableScreenSharingPkg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="EnableScreenSharing" 4 | version="1.0" 5 | identifier="com.example.${pkgname}" 6 | 7 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 8 | 9 | projectfolder=$(dirname "$0") 10 | 11 | pkgbuild --nopayload \ 12 | --identifier "${identifier}" \ 13 | --version "${version}" \ 14 | --scripts "${projectfolder}/scripts" \ 15 | "${projectfolder}/${pkgname}-${version}.pkg" 16 | -------------------------------------------------------------------------------- /Resources/EnableScreenSharing/scripts/postinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # EnableScreenSharing postinstall script 4 | 5 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 6 | 7 | if [ "$3" = "/" ]; then 8 | launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist 9 | fi 10 | -------------------------------------------------------------------------------- /Resources/GoogleChrome/Download Google Chrome.webloc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | URL 6 | https://www.google.com/chrome/browser/desktop/index.html 7 | 8 | 9 | -------------------------------------------------------------------------------- /Resources/GoogleChrome/Google Chrome Master Preferences: -------------------------------------------------------------------------------- 1 | { 2 | "homepage" : "http://scriptingosx.com", 3 | "homepage_is_newtabpage" : true, 4 | "browser" : { 5 | "show_home_button" : true, 6 | "check_default_browser" : false 7 | }, 8 | "session" : { 9 | "urls_to_restore_on_startup" : [ 10 | "http://scriptingosx.com/" 11 | ] 12 | }, 13 | "bookmark_bar" : { 14 | "show_on_all_tabs" : true 15 | }, 16 | "distribution" : { 17 | "auto_launch_chrome": false, 18 | "chrome": true, 19 | "import_bookmarks": false, 20 | "ping_delay": 60, 21 | "show_welcome_page": false, 22 | "skip_first_run_ui": true, 23 | "suppress_first_run_bubble": true, 24 | "do_not_create_desktop_shortcut": true, 25 | "do_not_create_quick_launch_shortcut": true, 26 | "do_not_launch_chrome": true, 27 | "do_not_register_for_update_launch": true, 28 | "log_file": "log.txt", 29 | "make_chrome_default": false, 30 | "make_chrome_default_for_user": false, 31 | "suppress_first_run_default_browser_prompt": true, 32 | "multi_install": true, 33 | "require_eula": false, 34 | "system_level": true, 35 | "verbose_logging": true 36 | }, 37 | "sync_promo" : { 38 | "user_skipped" : true 39 | }, 40 | "first_run_tabs" : [ 41 | "http://scriptingosx.com/" 42 | ] 43 | } -------------------------------------------------------------------------------- /Resources/GoogleChrome/GoogleChrome.mobileconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PayloadIdentifier 6 | com.example.profile.GoogleChrome 7 | PayloadRemovalDisallowed 8 | 9 | PayloadScope 10 | System 11 | PayloadType 12 | Configuration 13 | PayloadUUID 14 | 9466DD6A-3EC6-42C6-AEAA-80C25ABDDA86 15 | PayloadOrganization 16 | Example Com 17 | PayloadVersion 18 | 1 19 | PayloadDisplayName 20 | Google Chrome 21 | PayloadContent 22 | 23 | 24 | PayloadType 25 | com.apple.ManagedClient.preferences 26 | PayloadVersion 27 | 1 28 | PayloadIdentifier 29 | com.example.profile.GoogleChrome.payload 30 | PayloadUUID 31 | EE34B559-9BBD-4589-B2AB-67ABD397546D 32 | PayloadEnabled 33 | 34 | PayloadDisplayName 35 | Google Chrome Settings 36 | PayloadContent 37 | 38 | com.google.Chrome 39 | 40 | Forced 41 | 42 | 43 | mcx_preference_settings 44 | 45 | AutoFillEnabled 46 | 47 | DefaultBrowserSettingEnabled 48 | 49 | BookmarkBarEnabled 50 | 51 | HideWebStorePromo 52 | 53 | HomepageIsNewTabPage 54 | 55 | HomepageLocation 56 | http://scriptingosx.com/ 57 | PasswordManagerEnabled 58 | 59 | RestoreOnStartup 60 | 0 61 | SyncDisabled 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /Resources/GoogleChrome/buildGoogleChromeConfigurationPkg-v0.1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="GoogleChromeConfiguration" 4 | version="0.1" 5 | identifier="com.example.${pkgname}" 6 | 7 | PATH=/usr/bin:/bin:/usr/sbin:/sbin export PATH 8 | 9 | projectfolder=$(dirname "$0") 10 | 11 | pkgbuild --nopayload \ 12 | --identifier "${identifier}" \ 13 | --version "${version}" \ 14 | --scripts "${projectfolder}/scripts" \ 15 | "${projectfolder}/${pkgname}-${version}.pkg" -------------------------------------------------------------------------------- /Resources/GoogleChrome/buildGoogleChromeConfigurationPkg-v0.2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="GoogleChromeConfiguration" 4 | version="0.2" 5 | identifier="com.example.${pkgname}" 6 | 7 | PATH=/usr/bin:/bin:/usr/sbin:/sbin export PATH 8 | 9 | projectfolder=$(dirname "$0") 10 | 11 | pkgbuild --root "${projectfolder}/payload" \ 12 | --identifier "${identifier}" \ 13 | --version "${version}" \ 14 | --install-location "/" \ 15 | --scripts "${projectfolder}/scripts" \ 16 | "${projectfolder}/${pkgname}-${version}.pkg" 17 | -------------------------------------------------------------------------------- /Resources/GoogleChrome/postinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | PATH=/usr/bin:/bin:/usr/sbin:/sbin export PATH 4 | 5 | profileName="GoogleChrome.mobileconfig" 6 | 7 | setupPath="/private/var/db/ConfigurationProfiles/Setup/" 8 | 9 | resources=$(dirname "$0") 10 | profilePath="${resources}/${profileName}" 11 | 12 | if [ "$3" = "/" ] ; then 13 | profiles -I -F "${profilePath}" 14 | else 15 | mkdir -p "$3${setupPath}" 16 | cp "$3${profilePath}" "$3${setupPath}${profileName}" 17 | /bin/rm -f "$3${setupPath}.profileSetupDone" 18 | fi 19 | -------------------------------------------------------------------------------- /Resources/GoogleChrome/postinstall-final.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | PATH=/usr/bin:/bin:/usr/sbin:/sbin export PATH 4 | 5 | profileName="GoogleChrome.mobileconfig" 6 | setupPath="/private/var/db/ConfigurationProfiles/Setup/" 7 | 8 | resources=$(dirname "$0") 9 | profilePath="${resources}/${profileName}" 10 | 11 | if [ "$3" = "/" ] ; then 12 | profiles -I -F "${profilePath}" 13 | else 14 | mkdir -p "$3${setupPath}" 15 | cp "$3${profilePath}" "$3${setupPath}${profileName}" 16 | /bin/rm -f "$3${setupPath}.profileSetupDone" 17 | fi 18 | 19 | settingsDir="Library/Application Support/Google/Chrome/" 20 | 21 | # function to touch the First Run file 22 | createSettingsFile() { # userUID userHome 23 | if [ ! -d "$2/${settingsDir}" ]; then 24 | mkdir -p "$2/${settingsDir}" 25 | chown "$1" "$2/Library" 26 | chown "$1" "$2/Library/Application Support/" 27 | chown "$1" "$2/Library/Application Support/Google" 28 | chown "$1" "$2/Library/Application Support/Google/Chrome" 29 | fi 30 | if [ -d "$2$/{settingsDir}" ]; then 31 | touch "$1/${settingsDir}/First Run" 32 | chown "$1" "$2/${settingsDir}/First Run" 33 | fi 34 | } 35 | 36 | # create file in existing user home directories 37 | for userHome in "$3/Users"/* 38 | do 39 | userUID=$(basename "${userHome}") 40 | # skip the Shared folder 41 | if [ ! "${userUID}" = "Shared" ]; then 42 | createSettingsFile "${userUID}" "${userHome}" 43 | fi 44 | done 45 | 46 | # create file in user templates 47 | for userTemplate in "$3/System/Library/User Template"/* 48 | do 49 | createSettingsFile "root" "${userTemplate}" 50 | done 51 | -------------------------------------------------------------------------------- /Resources/InstallerUI/Distribution.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | InstallerUI Example 4 | 5 | 6 | 7 | 8 | 9 | InstallerUI-1.0.pkg 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Resources/InstallerUI/Resources/Conclusion.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf470 2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 3 | {\colortbl;\red255\green255\blue255;} 4 | \paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0 5 | \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 6 | 7 | \f0\fs24 \cf0 You are done! Congratulations, you have finished the example.com installation.} -------------------------------------------------------------------------------- /Resources/InstallerUI/Resources/License.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf470 2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 3 | {\colortbl;\red255\green255\blue255;} 4 | \paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0 5 | \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 6 | 7 | \f0\fs24 \cf0 License for the example.com installer.} -------------------------------------------------------------------------------- /Resources/InstallerUI/Resources/Readme.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf470 2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 3 | {\colortbl;\red255\green255\blue255;} 4 | \paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0 5 | \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 6 | 7 | \f0\fs24 \cf0 ReadMe text for the example.com installer.} -------------------------------------------------------------------------------- /Resources/InstallerUI/Resources/Welcome.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf470 2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 3 | {\colortbl;\red255\green255\blue255;} 4 | \paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0 5 | \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 6 | 7 | \f0\b\fs24 \cf0 Welcome to the example.com InstallerUI Installer!} -------------------------------------------------------------------------------- /Resources/InstallerUI/Resources/shebang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptingosx/PackagesForAppleAdministrators/2c8afabe1ebf72343f41ecd966e92d98a3f1c42b/Resources/InstallerUI/Resources/shebang.png -------------------------------------------------------------------------------- /Resources/InstallerUI/buildInstallerUIDistPkg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="InstallerUI" 4 | version="1.0" 5 | identifier="com.example.${pkgname}" 6 | 7 | PATH=/usr/bin:/bin:/usr/sbin:/sbin export PATH 8 | 9 | projectfolder=$(dirname "$0") 10 | 11 | pkgbuild --root "${projectfolder}/payload" \ 12 | --identifier "${identifier}" \ 13 | --version "${version}" \ 14 | --install-location "/" \ 15 | "${projectfolder}/${pkgname}-${version}.pkg" 16 | 17 | productbuild --distribution Distribution.xml \ 18 | --resources Resources \ 19 | "${projectfolder}/${pkgname}.pkg" -------------------------------------------------------------------------------- /Resources/Office2016/buildOffice2016Pkg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="Office2016" 4 | version="15.26.0" 5 | identifier="com.example.${pkgname}" 6 | 7 | PATH=/usr/bin:/bin:/usr/sbin:/sbin export PATH 8 | 9 | projectfolder=$(dirname "$0") 10 | 11 | pkgbuild --nopayload \ 12 | --identifier "${identifier}" \ 13 | --version "${version}" \ 14 | --scripts "${projectfolder}/scripts" \ 15 | "${projectfolder}/${pkgname}-${version}.pkg" 16 | -------------------------------------------------------------------------------- /Resources/Office2016/choicechangesMSOffice.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | attributeSetting 7 | 1 8 | choiceAttribute 9 | selected 10 | choiceIdentifier 11 | com.microsoft.word 12 | 13 | 14 | attributeSetting 15 | 0 16 | choiceAttribute 17 | selected 18 | choiceIdentifier 19 | com.microsoft.excel 20 | 21 | 22 | attributeSetting 23 | 0 24 | choiceAttribute 25 | selected 26 | choiceIdentifier 27 | com.microsoft.powerpoint 28 | 29 | 30 | attributeSetting 31 | 0 32 | choiceAttribute 33 | selected 34 | choiceIdentifier 35 | com.microsoft.onenote.mac 36 | 37 | 38 | attributeSetting 39 | 0 40 | choiceAttribute 41 | selected 42 | choiceIdentifier 43 | com.microsoft.outlook 44 | 45 | 46 | attributeSetting 47 | 1 48 | choiceAttribute 49 | selected 50 | choiceIdentifier 51 | com.microsoft.autoupdate 52 | 53 | 54 | attributeSetting 55 | 1 56 | choiceAttribute 57 | selected 58 | choiceIdentifier 59 | com.microsoft.licensing 60 | 61 | 62 | attributeSetting 63 | 1 64 | choiceAttribute 65 | selected 66 | choiceIdentifier 67 | com.microsoft.office.fonts 68 | 69 | 70 | attributeSetting 71 | 1 72 | choiceAttribute 73 | selected 74 | choiceIdentifier 75 | com.microsoft.office.frameworks 76 | 77 | 78 | attributeSetting 79 | 1 80 | choiceAttribute 81 | selected 82 | choiceIdentifier 83 | com.microsoft.office.proofing 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /Resources/Office2016/postinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # installs MSOffice with installer choices 4 | 5 | PATH=/usr/bin:/bin:/usr/sbin:/sbin export PATH 6 | 7 | # get the path to the enclosing folder 8 | resources=$(dirname "$0") 9 | 10 | # run the installer with the choice changes 11 | installer -applyChoiceChangesXML "${resources}/choicechangesMSOffice.plist" \ 12 | -pkg "${resources}/Microsoft_Office_2016_15.26.0_160910_Installer.pkg" \ 13 | -target "/" 14 | -------------------------------------------------------------------------------- /Resources/Office2016/‎macadmins.software.webloc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptingosx/PackagesForAppleAdministrators/2c8afabe1ebf72343f41ecd966e92d98a3f1c42b/Resources/Office2016/‎macadmins.software.webloc -------------------------------------------------------------------------------- /Resources/PolicyBanner/Policy Banners-Apple Support.webloc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptingosx/PackagesForAppleAdministrators/2c8afabe1ebf72343f41ecd966e92d98a3f1c42b/Resources/PolicyBanner/Policy Banners-Apple Support.webloc -------------------------------------------------------------------------------- /Resources/PolicyBanner/PolicyBanner.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf760 2 | {\fonttbl\f0\froman\fcharset0 Palatino-Roman;\f1\fswiss\fcharset0 Helvetica;} 3 | {\colortbl;\red255\green255\blue255;\red186\green18\blue10;\red0\green0\blue0;} 4 | {\*\expandedcolortbl;;\cssrgb\c78597\c14701\c2238;\csgenericrgb\c0\c0\c0;} 5 | \paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0 6 | \deftab920 7 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab920\sl360\slmult1\qc\partightenfactor0 8 | 9 | \f0\fs160 \cf2 \expnd0\expndtw0\kerning0 10 | Scripting OS X\ 11 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab920\sl360\slmult1\partightenfactor0 12 | 13 | \f1\fs48 \cf3 \ 14 | I have read an understood the End User Policy!\ 15 | \ 16 | (Yes, really!)\ 17 | } -------------------------------------------------------------------------------- /Resources/PolicyBanner/buildPolicyBannerPkg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="PolicyBanner" 4 | version="1.0" 5 | install_location="/Library/Security/" 6 | identifier="com.example.${pkgname}" 7 | 8 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 9 | 10 | projectfolder=$(dirname "$0") 11 | 12 | pkgbuild --root "${projectfolder}/payload" \ 13 | --identifier "${identifier}" \ 14 | --version "${version}" \ 15 | --install-location "${install_location}" \ 16 | "${projectfolder}/${pkgname}-${version}.pkg" 17 | -------------------------------------------------------------------------------- /Resources/SourceCodePro/PackageInfo.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Resources/SourceCodePro/adobe-fonts-source-code-pro.webloc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptingosx/PackagesForAppleAdministrators/2c8afabe1ebf72343f41ecd966e92d98a3f1c42b/Resources/SourceCodePro/adobe-fonts-source-code-pro.webloc -------------------------------------------------------------------------------- /Resources/SourceCodePro/build-info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | distribution_style 6 | 7 | identifier 8 | com.example.SourceCodePro 9 | install_location 10 | / 11 | name 12 | SourceCodePro-${version}.pkg 13 | ownership 14 | recommended 15 | postinstall_action 16 | logout 17 | suppress_bundle_relocation 18 | 19 | version 20 | 2.030f 21 | 22 | -------------------------------------------------------------------------------- /Resources/SourceCodePro/buildSourceCodeProPkg-final.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="SourceCodePro" 4 | version="2.030e" # use the version from your download 5 | identifier="com.example.${pkgname}" 6 | 7 | PATH=/usr/bin:/bin:/usr/sbin:/sbin export PATH 8 | 9 | projectfolder=$(dirname "$0") 10 | 11 | pkgbuild --root "${projectfolder}/payload" \ 12 | --identifier "${identifier}" \ 13 | --version "${version}" \ 14 | --install-location "/" \ 15 | --scripts "${projectfolder}/scripts" \ 16 | --info "${projectfolder}/PackageInfo.xml" \ 17 | --sign "Armin Briegel" \ 18 | "${pkgname}-${version}.pkg" 19 | -------------------------------------------------------------------------------- /Resources/SourceCodePro/buildSourceCodeProPkg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | pkgname="SourceCodePro" 4 | version="2.030" # use the version from your download 5 | install_location="/" 6 | identifier="com.example.${pkgname}" 7 | 8 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 9 | 10 | projectfolder=$(dirname "$0") 11 | 12 | pkgbuild --root "${projectfolder}/payload" \ 13 | --identifier "${identifier}" \ 14 | --version "${version}" \ 15 | --install-location "${install_location}" \ 16 | "${projectfolder}/${pkgname}-${version}.pkg" 17 | -------------------------------------------------------------------------------- /Resources/SourceCodePro/postinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # SourceCodePro postinstall script 4 | 5 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 6 | 7 | # run only if installing on current system 8 | if [ "$3" = "/" ]; then 9 | # use atsutil to clear the font cache 10 | atsutil databases -remove 11 | fi 12 | -------------------------------------------------------------------------------- /Resources/SourceCodePro/preinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # SourceCodePro preinstall script 4 | 5 | export PATH=/usr/bin:/bin:/usr/sbin:/sbin 6 | 7 | # find and delete any SourceCodePro file in any user folder 8 | 9 | find "$3"/Users/*/Library/Fonts -iname "SourceCodePro*.?tf" -delete 10 | --------------------------------------------------------------------------------