Table of Contents
Appify shell script creates macOS app bundle from the script. It works on all major macOS X versions on PowerPC, Intel or ARM architectures.
Script
#!/usr/bin/env bash
APPNAME=${2:-$(basename "${1}" '.sh')};
DIR="${APPNAME}.app/Contents/MacOS";
if [ -a "${APPNAME}.app" ]; then
echo "${PWD}/${APPNAME}.app already exists :(";
exit 1;
fi;
mkdir -p "${DIR}";
cp "${1}" "${DIR}/${APPNAME}";
chmod +x "${DIR}/${APPNAME}";
echo "${PWD}/$APPNAME.app";
Copy it to the /usr/local/bin/appify and chmod +x /usr/local/bin/appify
Usage
appify <shell script.sh> <app bundle name>