How do I make an executable that will add my Automator service which runs a bash script?

StackOverflow https://stackoverflow.com/questions/21167765

Вопрос

My friends are losing points in their computer science classes because their submission graders decompress and read zip files, which are obfuscated by a bunch of Apple metadata crap generated from zipping a file through the right-click contextual menu in Finder.

I've written a bash script to zip only unhidden files from a specific directory, and I've added a contextual menu service through Automator so this script can be run from right clicking a file.

The problem is I don't want to manually copy over all this stuff and make Automations on each computer my friends use. I'd like to leverage make or some similar utility to make an executable that will add the bash file and automator menu service to any computer the executable is opened from.

I'm lightly familiar with make (more familiar with rake), but I can't find out how to package the automator service and install it on their machine through an executable.

Это было полезно?

Решение

You'll want to package your automator application and script(s) into an Installer Package (.pkg). The best way to achieve this is to understand some general concepts, the commands to build one, and by checking out some tutorials or other relevant information.

I recommend for creating your first Installer Package using a utility such as Packages (open-source and free), which has excellent documentation, and is less complicated than using the command line tools. Basically it puts a nice gui around the Apple tools which are somewhat nonintutive by themselves.

Building Installer Packages is not the easiest thing to do your first time, and it might take a bit of patience to finally get it right. Once you've successfully created one you should have a good grasp on what is involved in putting them together along with the concept behind it all. At the very least, this information hopefully points you in the right direction regarding your question, and/or gives you a better idea of how to accomplish what you want to do.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top