Created
October 5, 2018 14:44
-
-
Save meehow/07362d7e4bc8723880140a0ddc3c72ec to your computer and use it in GitHub Desktop.
converts single binary or script to Mac OS X .app format
This file contains 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 | |
mkdir -p $2.app/Contents/{MacOS,Resources} | |
cp $1 $2.app/Contents/MacOS/$2 | |
cat > $2.app/Contents/Info.plist << EOF | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>CFBundleExecutable</key> | |
<string>$2</string> | |
<key>CFBundleGetInfoString</key> | |
<string>$2</string> | |
<key>CFBundleIconFile</key> | |
<string>$2</string> | |
<key>CFBundleIdentifier</key> | |
<string>$2</string> | |
<key>CFBundleName</key> | |
<string>$2</string> | |
<key>CFBundlePackageType</key> | |
<string>APPL</string> | |
</dict> | |
</plist> | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment