Last active
September 20, 2017 18:57
-
-
Save packetpilot/f6630f763120390aafad2c5392de7d1a to your computer and use it in GitHub Desktop.
Patch iTerm2 via luggage-based pkg, or with just the postinstall
This file contains hidden or 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
# iTerm: a simple payload-free iTerm installer | |
# | |
# Author: @packetpilot | |
# Created: 2017-09-19 | |
# Last Modified: 2017-09-19 | |
# | |
include /usr/local/share/luggage/luggage.make | |
TITLE=iTerm | |
REVERSE_DOMAIN=com.example.corp | |
PAYLOAD= \ | |
pack-script-postinstall |
This file contains hidden or 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 | |
# This script doesn't _seem_ polite, but it's been tested with an old 3.0.4 | |
# version running while 3.1.1 updates right behind it. Logs continued to tail | |
# just fine. So, while it might be optimal for login/logout hook, or at | |
# loginwindow, it also seems to non-disruptively do the job on-the-fly. | |
# Variables | |
EXTURL=https://iterm2.com/downloads/stable/latest | |
TMPDIR=${3}/tmp/iterm | |
ZIPLOC=${TMPDIR}/iTerm.zip | |
mkdir ${TMPDIR} | |
curl -L -o \ | |
${ZIPLOC} ${EXTURL} | |
unzip -o ${ZIPLOC} -d ${3}/Applications | |
rm -rf ${TMPDIR} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the postinstall script is used in a non-
installer
-based context, you'd likely want to remove the${3}
variable from the mix.