Appify
Jump to navigation
Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Scriptas skirtas konvertuoti shell scriptus į pilnai funkcionuojančias macOS programas.
#!/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";
Sudedame jį į /usr/local/bin/appify ir padarome paleidžiamu chmod +x /usr/local/bin/appify
Naudojimas
appify <shell scriptas.sh> <naujos programos pavadinimas>