Skip to content

Instantly share code, notes, and snippets.

@morteza
Last active August 29, 2015 14:03
Show Gist options
  • Save morteza/25520ead47b893adfc66 to your computer and use it in GitHub Desktop.
Save morteza/25520ead47b893adfc66 to your computer and use it in GitHub Desktop.
Create app bundle for Protege 5.0 from its binary distribution
#!/bin/bash
# Copy this into extracted `protege/` directory and execute in Terminal. Done!
# `Protege.app` will be available in the parent directory.
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PROTEGE_DIR=$CURRENT_DIR
cd $PROTEGE_DIR
DIR="../Protege.app/Contents/MacOS"
if [ -a "../Protege.app" ]; then
echo "../Protege.app already exists. Removing old file..."
rm -rf "../Protege.app"
fi
mkdir -p "$DIR"
cp -r "$PROTEGE_DIR/" "$DIR/"
mv "$DIR/run.sh" "$DIR/Protege"
chmod +x "$DIR/Protege"
mkdir -p "../Protege.app/Contents/Resources"
# Move Bundle stuff
mv "$DIR/info.plist" "../Protege.app/Contents/"
mv "$DIR/PkgInfo" "../Protege.app/Contents/"
# Move Icon
mv "$DIR/Protege.icns" "../Protege.app/Contents/Resources/"
echo "App bundle created at ../Protege.app"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment