Skip to content

Commit

Permalink
install to /L/E on 10.11+
Browse files Browse the repository at this point in the history
  • Loading branch information
RehabMan committed Oct 31, 2015
1 parent 61665d6 commit 4011b1a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
11 changes: 7 additions & 4 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@

# really just some handy scripts...

KEXT=CodecCommander.kext
DIST=RehabMan-CodecCommander
BUILDDIR=./build/Products
INSTDIR=/System/Library/Extensions
OPTIONS:=$(OPTIONS) -scheme CodecCommander

VERSION_ERA=$(shell ./print_version.sh)
ifeq "$(VERSION_ERA)" "10.10-"
INSTDIR=/System/Library/Extensions
else
INSTDIR=/Library/Extensions
endif

ifeq ($(findstring 32,$(BITS)),32)
OPTIONS:=$(OPTIONS) -arch i386
endif
Expand Down
9 changes: 9 additions & 0 deletions print_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#set -x

# extract minor version (eg. 10.9 vs. 10.10 vs. 10.11)
MINOR_VER=$([[ "$(sw_vers -productVersion)" =~ [0-9]+\.([0-9]+) ]] && echo ${BASH_REMATCH[1]})
if [[ $MINOR_VER -ge 11 ]]; then
echo 10.11+
else
echo 10.10-
fi

0 comments on commit 4011b1a

Please sign in to comment.