aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGeorgi Sabev <georgethebeatle@gmail.com>2018-03-18 11:00:12 +0200
committerGeorgi Sabev <georgethebeatle@gmail.com>2018-03-18 11:00:12 +0200
commit4f924fca750f90f75acfd5589ac601783c9f12af (patch)
treed248651290b03e5d618adeab991b7856888aad74 /scripts
parent448b70f271fd783b8cace3511288883d1a632072 (diff)
Add helper scripts for Mac OSX
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/osx_check.sh7
-rwxr-xr-xscripts/osx_post_install.sh13
-rw-r--r--scripts/resources/Info.plist44
3 files changed, 64 insertions, 0 deletions
diff --git a/scripts/osx_check.sh b/scripts/osx_check.sh
new file mode 100755
index 0000000..09f5d92
--- /dev/null
+++ b/scripts/osx_check.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+signed_kext_status=$(csrutil status)
+if [[ $signed_kext_status = *"enabled"* ]]; then
+ echo "**MAC OSX ERROR** Unsigned kernex extentions not allowed! To allow them restart in recovery OS by restarting and holding Cmd+R, open a shell and run 'csrutil disable'"
+ exit 1
+fi
diff --git a/scripts/osx_post_install.sh b/scripts/osx_post_install.sh
new file mode 100755
index 0000000..bd62e85
--- /dev/null
+++ b/scripts/osx_post_install.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+KEXT_PATH="/System/Library/Extensions/AmmoonLooperUsb.kext/Contents/"
+
+${SCRIPT_DIR}/osx_check.sh
+
+mkdir -p "${KEXT_PATH}"
+cp "${SCRIPT_DIR}"/resources/Info.plist "${KEXT_PATH}"
+
+kextload /System/Library/Extensions/AmmoonLooperUsb.kext
+touch /System/Library/Extensions
+
diff --git a/scripts/resources/Info.plist b/scripts/resources/Info.plist
new file mode 100644
index 0000000..4443673
--- /dev/null
+++ b/scripts/resources/Info.plist
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Ammoon AP-09 Nano Looper</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.ammoon.looper</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>Ammoon AP-09 Nano Looper</string>
+ <key>CFBundlePackageType</key>
+ <string>KEXT</string>
+ <key>CFBundleSignature</key>
+ <string>not-signed</string>
+ <key>CFBundleVersion</key>
+ <string>1.0.0</string>
+ <key>IOKitPersonalities</key>
+ <dict>
+ <key>Device Driver</key>
+ <dict>
+ <key>CFBundleIdentifier</key>
+ <string>com.apple.iokit.IOUSBMassStorageDriver</string>
+ <key>IOClass</key>
+ <string>IOService</string>
+ <key>IOProviderClass</key>
+ <string>IOUSBInterface</string>
+ <key>idProduct</key>
+ <integer>22314</integer>
+ <key>idVendor</key>
+ <integer>1155</integer>
+ <key>bConfigurationValue</key>
+ <integer>1</integer>
+ <key>bInterfaceNumber</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>OSBundleRequired</key>
+ <string>Local-Root</string>
+</dict>
+</plist>