Skip to content

Instantly share code, notes, and snippets.

@lambdageek
Created October 16, 2017 18:19
Show Gist options
  • Save lambdageek/b8b8e4c70a47a948866341a0baf08783 to your computer and use it in GitHub Desktop.
Save lambdageek/b8b8e4c70a47a948866341a0baf08783 to your computer and use it in GitHub Desktop.
How to run bear on OSX
#! /bin/bash
# This is how to run [Bear](https://github.com/rizsotto/Bear) on OSX Sierra or later without
# turning off System Integrity Protection on an autotools project
# Need to copy make and bash to a non-protected directory
XCODE_PATH=`xcode-select -p`
SIP_BYPASS=`pwd`/sip-bypass
mkdir -p ${SIP_BYPASS}
cp ${XCODE_PATH}/usr/bin/make ${SIP_BYPASS}/make || { echo could not copy make ; exit 1 ; }
cp -f /bin/bash ${SIP_BYPASS}/bash || { echo could not copy bash ; exit 1 ; }
exec bear ${SIP_BYPASS}/make MAKE=${SIP_BYPASS}/make SHELL=${SIP_BYPASS}/bash "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment