There are lots of ways to compile a Flex application, but basically it should boil down to the following options:
- let your IDE do it for you; there is no way to automate this process of course
- use the command line interface (CLI) (that's what you're doing); I suppose you could write a batch file or a shell script or whatever Mac equivalent may exist to automate the process a little more
- use ANT and the Flex ANT tasks that come with the SDK: http://livedocs.adobe.com/flex/3/html/help.html?content=anttasks_1.html; this is basically just a wrapper around the CLI, but it allows you to do other tasks like copying files, packaging, etc.
- use a build and dependency management tool like Maven or Gradle to automate everything. Both of these tools are primarily targeted at Java building, but they both have a plugin for building Flex applications:
The choice is up to you of course, but I personally prefer GradleFx for its simplicity and comprehensiveness. (Disclaimer: I actually liked it so much that I became a contributor to the project, so I may no longer be impartial ;) )