Skip to content

Instantly share code, notes, and snippets.

@anmoljagetia
anmoljagetia / appify
Created August 7, 2017 12:33
Appify script to create MacOS apps from scripts.
#!/usr/bin/env bash
Appify="$(basename "$0")"
if [ ! "$1" -o "$1" = "-h" -o "$1" = "--help" ]; then cat <<EOF
Appify v5 for Mac OS X
Creates the simplest possible Mac OS X app from a shell script.
Takes a shell script as its first argument:
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten